Create a scatter plot of the data on a 2-dim ebedding colored by feature. If discrete (factor) data is passed, the colorscale parameter must be provided, otherwise the plot will default to gradient shading.

FeatureScatterPlot(
  flat_embedding,
  feature,
  title,
  subtitle,
  featurename,
  colorscale = NULL,
  pointsize = 1,
  hide_legend = FALSE,
  legsize = 5,
  legt = 5,
  legtxt = 5,
  grad_lim = NULL,
  autoscale_dropout = FALSE,
  dropout_NA = TRUE
)

Arguments

flat_embedding

a low dim embedding of cells

feature

a scalar representation of feature

title

the title of the plot

subtitle

the subtitle of the plot

featurename

the name of the feature to title the legend

colorscale

color scale for discrete data

pointsize

the size of geom point

hide_legend

hide the legend and return a list, containing the legendless plot and the legend

legsize

the size of the legend

legt

size of legend title

legtxt

size of legend text

grad_lim

the limits of the color gradient for continuous features, this should usually be in log-expression space, overrides autoscale_dropout

autoscale_dropout

whether to set plots where the feature space is 0 to #102033, default min for scale_color_gradient auto scaling, overrides dropout_NA

dropout_NA

whether to set plots where the feature space is 0 to NA, note: the legend element in a hide_legend output will be NULL

Value

a ggplot2 object