View source: R/visualization.R
SingleSpatialPlot | R Documentation |
Base plotting function for all Spatial plots
SingleSpatialPlot(
data,
image,
cols = NULL,
image.alpha = 1,
image.scale = "lowres",
pt.alpha = NULL,
crop = TRUE,
pt.size.factor = NULL,
shape = 21,
stroke = NA,
col.by = NULL,
alpha.by = NULL,
cells.highlight = NULL,
cols.highlight = c("#DE2D26", "grey50"),
geom = c("spatial", "interactive", "poly"),
na.value = "grey50"
)
data |
Data.frame with info to be plotted |
image |
|
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
|
image.alpha |
Adjust the opacity of the background images. Set to 0 to remove. |
image.scale |
Choose the scale factor ("lowres"/"hires") to apply in order to matchthe plot with the specified 'image' - defaults to "lowres" |
pt.alpha |
Adjust the opacity of the points if plotting a
|
crop |
Crop the plot in to focus on points plotted. Set to |
pt.size.factor |
Sets the size of the points relative to spot.radius |
shape |
Control the shape of the spots - same as the ggplot2 parameter. The default is 21, which plots cirlces - use 22 to plot squares. |
stroke |
Control the width of the border around the spots |
col.by |
Mapping variable for the point color |
alpha.by |
Mapping variable for the point alpha value |
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 |
cols.highlight |
A vector of colors to highlight the cells as; ordered the same as the groups in cells.highlight; last color corresponds to unselected cells. |
geom |
Switch between normal spatial geom and geom to enable hover functionality |
na.value |
Color for spots with NA values |
A ggplot2 object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.