Description Usage Arguments Details Value Slight tweaks to dittoPlot defaults Author(s) See Also Examples
View source: R/multi_plotters.R
Generates dittoPlots for multiple features.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
object |
A Seurat, SingleCellExperiment, or SummarizedExperiment object. |
vars |
c("var1","var2","var3",...). A vector of gene or metadata names from which to generate the separate plots |
group.by |
String representing the name of a metadata to use for separating the cells/samples into discrete groups. |
ncol, nrow |
Integer or NULL. How many columns or rows the plots should be arranged into. |
main, ylab |
String which sets whether / how plot titles or y-axis labels should be added to each individual plot
|
list.out |
Logical. (Default = FALSE) When set to |
OUT.List |
Deprecated. Use |
..., xlab, data.out, do.hover, legend.show |
other paramters passed along to |
Given multiple 'var' parameters to vars
, this function creates a dittoPlot
for each one, with minor defaulting tweaks (see below).
By default, these dittoPlots are arranged into a grid.
Alternatively, if list.out
is set to TRUE
, they are output as a list with each plot named as the vars
being shown.
All parameters that can be adjusted in dittoPlot can be adjusted here, but the only input that will change between plots is the var
.
A set of dittoPlots either arranged into a grid (default), or output as a list.
axes labels are not shown by default to save space (control with xlab
and ylab
)
legends are also not shown to save space (control with legend.show
)
Daniel Bunis
dittoPlot
for the single plot version of this function and details on all accepted inputs.
dittoDotPlot
and dittoPlotVarsAcrossGroups
to show, in a single plot, per-group summaries of the values for multiple vars.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | example(importDittoBulk, echo = FALSE)
genes <- getGenes(myRNA)[1:4]
multi_dittoPlot(myRNA,
vars = c("gene1", "gene2", "gene3", "gene4"),
group.by = "clustering")
#To make it output a grid that is 2x2, to add y-axis labels
# instead of titles, and to show legends...
multi_dittoPlot(myRNA, c("gene1", "gene2", "gene3", "gene4"), "clustering",
nrow = 2, ncol = 2, #Make grid 2x2 (only one of these needed)
main = NULL, ylab = "make", #Add y axis labels instead of titles
legend.show = TRUE) #Show legends
# Output as list instead
multi_dittoPlot(myRNA, c("gene1", "gene2", "gene3", "gene4"), "clustering",
list.out = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.