ggpLayerGroupOutline | R Documentation |
Highlights groups of barcode-spots by encircling them.
Depending on the plot_type
this can be added to a surface plot
or a dimensional reduction plot.
ggpLayerGroupOutline(
object,
grouping,
group_subset = NULL,
plot_type = "surface",
line_alpha = 1,
line_color = "black",
line_size = 1,
line_type = "solid",
alpha = 0,
fill = NA,
incl_edge = FALSE,
merdge_edge = FALSE,
incr_vert = FALSE,
bcsp_rm = character(0),
outlier_rm = TRUE,
eps = recDbscanEps(object),
minPts = recDbscanMinPts(object),
concavity = NULL,
expand_outline = 0,
...
)
object |
An object of class |
grouping |
Character value. The grouping variable of interest. Use
|
group_subset |
Character value or |
plot_type |
Character value. Either 'surface' or the name of a conducted dimensional reduction. |
line_alpha |
Numeric. Affects alpha of main lines of the plot. |
line_color |
Character. Affects color of the main lines of the plot. |
line_size |
Numeric. Affects size of the main lines of the plot. |
line_type |
Character. The line type. One of 'blank', 'solid', 'dashed', 'dotted', 'dotdash', 'longdash' and 'twodash'. |
incl_edge |
Logical. If |
incr_vert |
Logical value. If |
bcsp_rm |
Character vector or |
outlier_rm , minPts |
Logical. If |
eps |
Distance measure. Given to |
concavity |
Numeric value. Given to argument |
expand_outline |
Distance measure with which to expand the outline. Must be provided in pixel units! |
... |
Additional arguments given to |
ggpLayer*()
-functions return lists of ggproto
objects
that can be added to ggplots via the +
operator. In most of the cases
they are supposed to be added to plots created with the plotSurface*()
family.
library(SPATA2)
library(tidyverse)
data("example_data")
object <- loadExampleObject("UKF275T", meta = TRUE)
plotSurface(object, color_by = "bayes_space") +
ggpLayerGroupOutline(object, grouping = "bayes_space", group_subset = c("B1", "B2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.