do_RidgePlot() | Density ridge plots

Ridge plots display density distributions stacked vertically, making it easy to compare distributions across many groups. Built on the ggridges package.


Basic usage

p <- SCpubr::do_RidgePlot(sample = sample,
                          feature = "nCount_RNA",
                          group.by = "subtype")
p


Split by variable

p <- SCpubr::do_RidgePlot(sample = sample,
                          feature = "nCount_RNA",
                          group.by = "subtype",
                          split.by = "technology")
p


Continuous color scale

Color ridges by a continuous gradient instead of categorical colors:

p <- SCpubr::do_RidgePlot(sample = sample,
                          feature = "nCount_RNA",
                          group.by = "subtype",
                          continuous_scale = TRUE)
p


Parameter reference

Note

For parameters shared across many functions (color palettes, typography, legend styling, grid), see Shared features.

Core parameters

Parameter Description Default
feature Feature to plot
continuous_scale Use continuous color scale FALSE

See also