ggspaghetti | R Documentation |
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,
...
)
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. |
Yu Chen and Regis Pouillot
data(ec)
EC2 <- evalmcmod(ec[[2]])
# When the input is mc object
ggspaghetti(EC2)
# When the input is mcnode object
data(total)
# mcnode has one variate
ggspaghetti(xV)
# This mcnode has two variates, will save two plots in a list
gplots <- ggplotmc(xVUM) #will save two plots in a list
# show the first variate plot of xVUM mcnode
gplots[[1]]
# directly show the first variate plot of xVUM mcnode
ggspaghetti(xVUM, which = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.