Plot a tSNE or umap colored by feature. — plot_dims (original) (raw)
Plot a tSNE or umap colored by feature.
Usage
plot_dims(
data,
x = "UMAP_1",
y = "UMAP_2",
feature = NULL,
legend_name = "",
c_cols = pretty_palette2,
d_cols = NULL,
pt_size = 0.25,
alpha_col = NULL,
group_col = NULL,
scale_limits = NULL,
do_label = FALSE,
do_legend = TRUE,
do_repel = TRUE
)
Arguments
input data
x variable
y variable
feature to color by
legend name to display, defaults to no name
character vector of colors to build color gradient for continuous values, defaults to [pretty_palette](pretty%5Fpalette.html)
character vector of colors for discrete values. defaults to RColorBrewer paired palette
point size
whether to refer to data column for alpha values
group by another column instead of feature, useful for labels
defaults to min = 0, max = max(data$x), otherwise a two-element numeric vector indicating min and max to plot
whether to label each cluster at median center
whether to draw legend
whether to use ggrepel on labels
Value
ggplot object, cells projected by dr, colored by feature
Examples
plot_dims(
pbmc_meta,
feature = "classified"
)