View source: R/visualization.R
tof_plot_cells_density | R Documentation |
This function plots marker expression density plots for a user-specified column in a tof_tbl. Optionally, cells can be grouped to plot multiple vertically-arranged density plots
tof_plot_cells_density(
tof_tibble,
marker_col,
group_col,
num_points = 512,
theme = ggplot2::theme_bw(),
use_ggridges = FALSE,
scale = 1,
...
)
tof_tibble |
A 'tof_tbl' or a 'tibble'. |
marker_col |
An unquoted column name representing which column in 'tof_tibble' (i.e. which CyTOF protein measurement) should be included in the feature extraction calculation. |
group_col |
Unquoted column names representing which column in 'tof_tibble' should be used to break the rows of 'tof_tibble' into subgroups to be plotted as separate histograms. Defaults to plotting without subgroups. |
num_points |
The number of points along the full range of 'marker_col' at which the density should be calculated |
theme |
The ggplot2 theme for the plot. Defaults to
|
use_ggridges |
A boolean value indicting if
|
scale |
Use to set the 'scale' argument in |
... |
Additional optional arguments to send to |
A ggplot object
sim_data <-
dplyr::tibble(
cd45 = rnorm(n = 1000),
cd38 = rnorm(n = 1000),
cd34 = rnorm(n = 1000),
cd19 = rnorm(n = 1000),
cluster_id = sample(c("a", "b"), size = 1000, replace = TRUE)
)
density_plot <-
tof_plot_cells_density(
tof_tibble = sim_data,
marker_col = cd45,
group_col = cluster_id
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.