Skip to contents

Produce single scatter plot with data frame passed from upstream


  colorBy = NULL,
  shapeBy = NULL,
  dotOrder = c("shuffle", "ascending", "descending"),
  dotSize = getOption("ligerDotSize"),
  dotAlpha = 0.9,
  trimHigh = NULL,
  trimLow = NULL,
  zeroAsNA = TRUE,
  raster = NULL,
  labelBy = colorBy,
  labelText = TRUE,
  labelTextSize = 4,
  seed = 1,



Data frame like object (fortifiable) that contains all necessary information to make the plot.

x, y

Available variable name in cellMeta slot to look for the dot coordinates. See details.

colorBy, shapeBy

See plotDimRed.


Controls the order that each dot is added to the plot. Choose from "shuffle", "ascending", or "descending". Default "shuffle", useful when coloring by categories that overlaps (e.g. "dataset"), "ascending" can be useful when coloring by a continuous variable (e.g. gene expression) where high values needs more highlight. NULL use default order.

dotSize, dotAlpha

Numeric, controls the size or transparency of all dots. Default getOption("ligerDotSize") (1) and 0.9.

trimHigh, trimLow

Numeric, limit the largest or smallest value of continuous colorBy variable. Default NULL.


Logical, whether to set zero values in continuous colorBy variable to NA so the color of these value.


Logical, whether to rasterize the plot. Default NULL automatically rasterize the plot when number of total cells to be plotted exceeds 100,000.


A variable name available in plotDF. If the variable is categorical (a factor), the label position will be the median coordinates of all dots within the same group. Unique labeling in character vector for each dot is also acceptable. Default colorBy.


Logical, whether to show text label at the median position of each categorical group specified by colorBy. Default TRUE. Does not work when continuous coloring is specified.


Numeric, controls the size of label size when labelText = TRUE. Default 4.


Random seed for reproducibility. Default 1.


More theme setting arguments passed to .ggplotLigerTheme.


ggplot object by default. When plotly = TRUE, returns plotly (htmlwidget) object.


Having package "ggrepel" installed can help adding tidier text labels on the scatter plot.