plotMolecules2D.Rd
Visualizes the positions of molecules in 2D space on the sample.
plotMolecules2D(
object,
molecules,
pt_alpha = 0.5,
pt_size = 1,
pt_clrp = NULL,
clrp_adjust = NULL,
use_scattermore = TRUE,
xrange = getCoordsRange(object)$x,
yrange = getCoordsRange(object)$y,
display_facets = TRUE,
nrow = NULL,
ncol = NULL,
assay_name = activeAssay(object),
...
)
An object of class SPATA2
or, in case of S4 generics,
objects of classes for which a method has been defined.
Character vector. The molecules of interest.
Numeric value. Specifies the degree of transparency of all points.
Numeric value. Specifies the size of all points.
The color palette to be used if the specified variable displayed by
color is categorical/discrete. Run validColorPalettes()
to see valid input.
Named character vector or NULL. If character, it adjusts the color palette that is used to represent the groups. Names of the input vector must refer to the group and the respective named element denotes the color with which to represent the group.
Logical value. If TRUE
, data points are plotted with
scattermore::geom_scattermore()
which allows quick plotting of several
thousand data points. If the number of data points plotted is bigger than
10.000 it is used anyway.
Distance vector of length
two or NULL
. If not NULL
, specifies the x- and y-range to which
the spatial output is cropped. E.g. xrange = c(200, 500)
results in
the two dimensional space being cropped from x-coordinate 200px up to
x-coordinate 500px. If NULL
, the original range is used.
Logical value. If set to TRUE the plot is split via
ggplot2::facet_wrap()
such that each variable gets it's own subplot.
Numeric values or NULL. Used to arrange multiple plots.
Only relevant if the SPATA2
object contains more than
one assay: Denotes the assay of interest and thus the
molecular modality to use. Defaults to the active assay
as set by activateAssay()
.
Used to absorb deprecated arguments or functions.
The updated input object, containing the added, removed or computed results.