STPlot | R Documentation |
Graphs ST spots colored by continuous or categorical features
STPlot( data, data.type = NULL, variable, pt.size = 1, pt.alpha = 1, pt.border = FALSE, palette = "MaYl", cols = NULL, ncol = NULL, spot.colors = NULL, center.zero = TRUE, center.tissue = FALSE, plot.title = NULL, dims = NULL, split.labels = FALSE, pxum = NULL, sb.size = 2.5, dark.theme = FALSE, limits = NULL, label.by = NULL, ... )
data |
Object of class 'data.frame' containing at least (x, y) coordinates, a "sample" vector with labels for each sample and one column with the feature values. Can also include an additional column for shapes. |
data.type |
String specifying the class of the features in data to be plotted |
variable |
Name of feature column |
pt.size |
Point size of each ST spot [default: 1] |
pt.alpha |
Opacity of each ST spot [default: 1] |
pt.border |
Should a border be drawn around the spots? [default: TRUE] |
palette |
Color palette used for spatial heatmap (see |
cols |
A vector of colors to use for colorscale, e.g. |
ncol |
Number of columns to arrange the samples into. This can for example be useful to adjust if you want to visualize the samples in just in one row or one column. |
spot.colors |
Character vector with color names that overrides default coloring with ggplot2 |
center.zero |
Specifies whther or not the colorscale should be centered around 0. For some values, such as Principal Component vectors,
the distribution of values is centered at 0 and in that case it can be appropriate to use a divergent colorscale with a predefined value for 0.
If this parameter is set to TRUE, the ggplot2 function |
center.tissue |
Adjust coordinates so that the center of the tissue is in the middle of the array along the y-axis. This can be useful if your
samples have been placed in very different parts of the capture area and you want to center the plots in the middle. This is however unnecessary if
you have already aligned the sample data (see |
plot.title |
String specifying the title of the plot |
dims |
List of dimensions for x and y scales. If you have mixed datasets from different arrays (platforms) with different resolution, this list of dimensions will be used to specify the limits along the x- and y-axis of the array for each sample. |
split.labels |
Only works if the features are specified by character vectors. The plot will be split into one plot for each group label, highlighting the labelled spots. |
pxum |
A data.frame object with columns for 'x', 'xend', 'y' and 'sample' used for facetted plots. |
sb.size |
Defines the size of the scalebar |
dark.theme |
Switches color of scalebar to 'white' |
limits |
Sets the range of the colorbar values |
label.by |
Feature to relabel facets by. By default, facets are given a unique section number ranging grom 1 to the number of sections available in the 'Staffli' object. If you want to relabel these facets you can pass the name of a column that keeps the labels that you want to use. For example, if you wish to rename the facets to use labels defined by a charcater vector in column "section_id" in your meta.data slot, you can pass 'label.by = "section_id"' to relabel the facets. Only works for categorical group variables with where the number of groups is less than or equal to the number of tissue sections in your Staffli object. |
... |
Parameters passed to geom_point() |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.