View source: R/Seurat.Utils.Visualization.R
save4plots.A4 | R Documentation |
Arranges and saves four plots (e.g. UMAPs) onto a single A4 page, allowing for a compact comparison of different visualizations or clustering results.
save4plots.A4(
plot_list,
pname = FALSE,
suffix = NULL,
scale = 1,
nrow = 2,
ncol = 2,
h = 8.27 * scale,
w = 11.69 * scale,
...
)
plot_list |
A list containing ggplot objects to be arranged and saved; each object represents one panel. |
pname |
Plot name; if FALSE, a name is generated automatically based on |
suffix |
Suffix to be added to the filename; Default: NULL. |
scale |
Scaling factor for adjusting the size of the overall plot canvas; Default: 1. |
nrow |
Number of rows to arrange the plots in; Default: 2. |
ncol |
Number of columns to arrange the plots in; Default: 2. |
h |
Height of the plot canvas, calculated as the height of an A4 page times |
w |
Width of the plot canvas, calculated as the width of an A4 page times |
... |
Additional parameters passed to |
## Not run:
p1 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) +
geom_point()
p2 <- ggplot(mtcars, aes(mpg, disp, color = as.factor(cyl))) +
geom_point()
p3 <- ggplot(mpg, aes(displ, hwy, color = class)) +
geom_point()
p4 <- ggplot(diamonds, aes(carat, price, color = cut)) +
geom_point()
save4plots.A4(plot_list = list(p1, p2, p3, p4))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.