plot_c | R Documentation |
patchwork
or
trelliscopejs
packages.Easily combine an arbitrary number of plots into a multi-panel
display using either wrap_plots
for a single
static display or trelliscope
for an
interactive display. The static (patchwork
) output option (trelliscope =
FALSE) is useful if you intend to produce a multi-panel graph for printing
or inclusion in a static document. The interactive (trelliscopejs
) output
option (trelliscope = TRUE) is useful when you want to combine too many
plots to render them all legibly on the screen or if you want to combine
plotly
graphs such as those generated by the "interactive" mode of other
elucidate plot_*
functions.
plot_c( ..., nrow = NULL, ncol = NULL, guides = c("collect", "auto", "keep"), trelliscope = FALSE )
... |
Any number of plots to combine into a multi-panel display. Also accepts a (single) list of plots. Set trelliscope = TRUE if any of the plots are plotly objects. |
nrow |
The number of rows to use when arranging plot panels. |
ncol |
The number of columns to use when arranging plot panels. |
guides |
IF trelliscope = FALSE, this determines how
|
trelliscope |
Set this to TRUE if you want to combine plots into an
interactive trelliscope display with
|
A static "patchwork" or dynamic "trelliscope" multi-panel graphical display depending upon the value of the "trelliscope" argument.
Craig P. Hutton, Craig.Hutton@gov.bc.ca
wrap_plots
, trelliscope
#create a few basic plots with elucidate::plot_* functions p1 <- plot_density(pdata, y1) p2 <- plot_bar(pdata, g) p3 <- plot_histogram(pdata, y2) #combine them into a static multi-panel display with plot_c() plot_c(p1, p2, p3) #combine them into a dynamic multi-panel display #by setting the trelliscope argument to TRUE plot_c(p1, p2, p3, trelliscope = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.