Preview a Giotto spatial object
plot-generic.Rd
S4 generic for previewing Giotto's image and subcellular objects.
Usage
# S4 method for giottoImage,missing
plot(x, y, ...)
# S4 method for giottoLargeImage,missing
plot(
x,
y,
col,
max_intensity,
mar,
asRGB = FALSE,
legend = FALSE,
axes = TRUE,
maxcell = 5e+05,
smooth = TRUE,
...
)
# S4 method for giottoPolygon,missing
plot(
x,
point_size = 0.6,
type = c("poly", "centroid"),
max_poly = getOption("giotto.plot_max_poly", 10000),
...
)
# S4 method for giottoPoints,missing
plot(x, point_size = 0, feats = NULL, raster = TRUE, raster_size = 600, ...)
# S4 method for spatLocsObj,missing
plot(x, y, ...)
# S4 method for dimObj,missing
plot(x, dims = c(1, 2), ...)
# S4 method for spatialNetworkObj,missing
plot(x, y, ...)
Arguments
- x
giotto image, giottoPolygon, or giottoPoints object
- y
Not used.
- ...
additional parameters to pass
- col
character. Colors. The default is grDevices::grey.colors(n = 256, start = 0, end = 1, gamma = 1)
- max_intensity
(optional) value to treat as maximum intensity in color scale
- mar
numeric vector of length 4 to set the margins of the plot (to make space for the legend). The default is (3, 5, 1.5, 1)
- asRGB
(optional) logical. Force RGB plotting if not automatically detected
- legend
logical or character. If not FALSE a legend is drawn. The character value can be used to indicate where the legend is to be drawn. For example "topright" or "bottomleft"
- axes
logical. Draw axes?
- maxcell
positive integer. Maximum number of cells to use for the plot
- smooth
logical. If TRUE the cell values are smoothed
- point_size
size of points when plotting giottoPoints
- type
what to plot: either 'poly' (default) or polygon 'centroid'
- max_poly
numeric. If
type
is not specified, maximum number of polygons to plot before automatically switching to centroids plotting. Default is 1e4. This value is settable using options("giotto.plot_max_poly")- feats
specific features to plot within giottoPoints object (defaults to NULL, meaning all available features)
- raster
default = TRUE, whether to plot points as rasterized plot with size based on
size
param- raster_size
Default is 600. Only used when
raster
is TRUE- dims
dimensions to plot
Functions
plot(x = giottoImage, y = missing)
: Plot magick-based giottoImage object. ... param passes to.plot_giottoimage_mg
plot(x = giottoLargeImage, y = missing)
: Plot terra-based giottoLargeImage object. ... param passes to.plot_giottolargeimage
plot(x = giottoPolygon, y = missing)
: Plot terra-based giottoPolygon object. ... param passes toplot
plot(x = giottoPoints, y = missing)
: terra-based giottoPoint object. ... param passes toplot
plot(x = spatLocsObj, y = missing)
: Plot a spatLocsObjplot(x = dimObj, y = missing)
: Plot a dimObjplot(x = spatialNetworkObj, y = missing)
: Plot a spatialNetworkObj