Use ggplot to draw spaghetti plots for the [mc] or [mcnode] objects.
ggspaghetti(x,...)## S3 method for class 'mc'ggspaghetti( x, griddim =NULL, xlab = names(x), ylab ="F(n)", main ="", maxlines =100,...)## S3 method for class 'mcnode'ggspaghetti( x, griddim =NULL, xlab = names(x), ylab ="F(n)", main ="", which =NULL, maxlines =100,...)
Arguments
x: an mc or an mcnode object
...: further arguments to be passed to [ggplot2::stat_ecdf()]
griddim: a vector of two integers, indicating the size of the grid of the graph. If NULL, the grid is calculated to produce a "nice" graph.
xlab: vector of labels for the x-axis. If NULL, use the name of the node.
ylab: vector of labels for the y-axis.
main: vector of main titles of the graph
maxlines: the maximum number of ecdf to draw.
which: An argument used for an mcnode with multivariates. Can specify which variate plot to display. When variates are more than one, the output will be saved in a plot list by default or use the number of which variate to display.
Examples
data(ec)EC2 <- evalmcmod(ec[[2]])# When the input is mc objectggspaghetti(EC2)# When the input is mcnode objectdata(total)# mcnode has one variateggspaghetti(xV)# This mcnode has two variates, will save two plots in a listgplots <- ggplotmc(xVUM)#will save two plots in a list# show the first variate plot of xVUM mcnodegplots[[1]]# directly show the first variate plot of xVUM mcnodeggspaghetti(xVUM, which =1)