Plot a single dimension

SingleDimPlot(
  data,
  dims,
  col.by = NULL,
  cols = NULL,
  pt.size = NULL,
  shape.by = NULL,
  alpha.by = NULL,
  order = NULL,
  label = FALSE,
  repel = FALSE,
  label.size = 4,
  cells.highlight = NULL,
  cols.highlight = "#DE2D26",
  sizes.highlight = 1,
  na.value = "grey50",
  raster = NULL,
  raster.dpi = NULL
)

Arguments

data

Data to plot

dims

A two-length numeric vector with dimensions to use

col.by

...

cols

Vector of colors, each color corresponds to an identity class. This may also be a single character or numeric value corresponding to a palette as specified by brewer.pal.info.By default, ggplot2 assigns colors

pt.size

Adjust point size for plotting

shape.by

If NULL, all points are circles (default). You can specify any cell attribute (that can be pulled with FetchData) allowing for both different colors and different shapes on cells.

alpha.by

Mapping variable for the point alpha value

order

Specify the order of plotting for the idents. This can be useful for crowded plots if points of interest are being buried. Provide either a full list of valid idents or a subset to be plotted last (on top).

label

Whether to label the clusters

repel

Repel labels

label.size

Sets size of labels

cells.highlight

A list of character or numeric vectors of cells to highlight. If only one group of cells desired, can simply pass a vector instead of a list. If set, colors selected cells to the color(s) in cols.highlight and other cells black (white if dark.theme = TRUE); will also resize to the size(s) passed to sizes.highlight

cols.highlight

A vector of colors to highlight the cells as; will repeat to the length groups in cells.highlight

sizes.highlight

Size of highlighted cells; will repeat to the length groups in cells.highlight

na.value

Color value for NA points when using custom scale.

raster

Convert points to raster format, default is NULL which will automatically use raster if the number of points plotted is greater than 100,000

raster.dpi

the pixel resolution for rastered plots, passed to geom_scattermore(). Default is c(512, 512)

Value

A ggplot2 object