View source: R/multi_plotters.R
multi_dittoPlot | R Documentation |
Generates dittoPlots for multiple features.
multi_dittoPlot(
object,
vars,
group.by,
ncol = 3,
nrow = NULL,
main = "var",
ylab = NULL,
list.out = FALSE,
OUT.List = NULL,
...,
xlab = NULL,
data.out = FALSE,
do.hover = FALSE,
legend.show = FALSE
)
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.
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.