View source: R/visualization.R
tof_plot_cells_scatter | R Documentation |
This function makes scatterplots of single-cell data using user-specified x- and y-axes. Additionally, each point in the scatterplot can be colored using a user-specified variable.
tof_plot_cells_scatter(
tof_tibble,
x_col,
y_col,
color_col,
facet_cols,
theme = ggplot2::theme_bw(),
...,
method = c("ggplot2", "scattermore")
)
tof_tibble |
A 'tof_tbl' or a 'tibble'. |
x_col |
An unquoted column name specifying which column in 'tof_tibble' should be used as the x-axis. |
y_col |
An unquoted column name specifying which column in 'tof_tibble' should be used as the y-axis. |
color_col |
An unquoted column name specifying which column in 'tof_tibble' should be used to color each point in the scatterplot. |
facet_cols |
An unquoted column name specifying which column in
'tof_tibble' should be used to break the scatterplot into facets using
|
theme |
A ggplot2 theme to apply to the scatterplot. Defaults to
|
... |
Optional additional arguments to pass to |
method |
A string indicating which plotting engine should be used. Valid
values include "ggplot2" (the default) and "scattermore" (recommended if more than
100K cells are being plotted). Note that |
A ggplot object.
Other visualization functions:
tof_plot_cells_embedding()
,
tof_plot_cells_layout()
sim_data <-
dplyr::tibble(
cd45 = rnorm(n = 1000),
cd38 = c(rnorm(n = 500), rnorm(n = 500, mean = 2)),
cd34 = c(rnorm(n = 500), rnorm(n = 500, mean = 4)),
cd19 = rnorm(n = 1000),
cluster_id = c(rep("a", 500), rep("b", 500))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.