View source: R/visualization.R
SingleDimPlot | R Documentation |
Plot a single dimension
SingleDimPlot(
data,
dims,
col.by = NULL,
cols = NULL,
pt.size = NULL,
shape.by = NULL,
alpha = 1,
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
)
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 |
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 |
alpha |
Alpha value for plotting (default is 1) |
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 |
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 |
raster.dpi |
the pixel resolution for rastered plots, passed to geom_scattermore(). Default is c(512, 512) |
A ggplot2 object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.