Description Usage Arguments Value Methods (by class) Author(s) Examples
Plot gene-weighted 2D kernel density
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | plot_density(
object,
features,
slot = NULL,
joint = FALSE,
reduction = NULL,
dims = c(1, 2),
method = c("ks", "wkde"),
adjust = 1,
size = 1,
shape = 16,
combine = TRUE,
pal = "viridis",
...
)
## S4 method for signature 'Seurat'
plot_density(
object,
features,
slot = NULL,
joint = FALSE,
reduction = NULL,
dims = c(1, 2),
method = c("ks", "wkde"),
adjust = 1,
size = 1,
shape = 16,
combine = TRUE,
pal = "viridis",
...
)
## S4 method for signature 'SingleCellExperiment'
plot_density(
object,
features,
slot = NULL,
joint = FALSE,
reduction = NULL,
dims = c(1, 2),
method = c("ks", "wkde"),
adjust = 1,
size = 1,
shape = 16,
combine = TRUE,
pal = "viridis",
...
)
|
object |
Seurat or SingleCellExperiment object |
features |
Features (e.g. genes) to visualize |
slot |
Type of data: |
joint |
Return joint density plot? By default |
reduction |
Name of the reduction to visualize. If not provided, last computed reduction is visualized |
dims |
Vector of length 2 specifying the dimensions to be plotted. By default, the first two dimensions are considered. |
method |
Kernel density estimation method:
|
adjust |
Numeric value to adjust to bandwidth. Default: 1. Not available
for |
size |
Size of the geom to be plotted (e.g. point size) |
shape |
Shape of the geom to be plotted |
combine |
Create a single plot? If |
pal |
String specifying the viridis color palette to use. |
... |
Further scale arguments passed to scale_color_viridis_c Options:
|
A scatterplot from a given reduction showing the gene-weighted density
Seurat
: Plot gene-weighted 2D kernel density
SingleCellExperiment
: Plot gene-weighted 2D kernel density
Jose Alquicira-Hernandez
1 2 | data <- SeuratObject::pbmc_small
plot_density(data, "CD3E")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.