Description Usage Arguments Value
View source: R/add_density_coloring.R
Color cells using a background density
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
cell_positions |
The positions of the cells in 2D. Must be a tibble with character column |
color_density |
How to color density, can be "none", "grouping", or "feature". |
trajectory |
A dynwrap trajectory. |
grouping |
A grouping of the cells (e.g. clustering) as a named character vector. |
groups |
A tibble containing character columns |
feature_oi |
The name of a feature to use for colouring the cells. |
expression_source |
Source of the feature expression, defaults to |
padding |
The padding in the edges to the plot, relative to the size of the plot. |
nbins |
Number of bins for calculating the density. |
bw |
Bandwidth, relative to the size of the plot. |
density_cutoff |
Cutoff for density, the lower the larger the areas. |
density_cutoff_label |
Cutoff for density for labeling, the lower the further way from cells. |
A named list with objects:
polygon: A layer to add to the ggplot.
scale: A scale to add to the ggplot.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.