Add point layer to SpatialData plot
Arguments
- i
Index or name of point to plot.
- j
Index or name of coordinate transformation to use. If
NULL, the coordinate transformation will be inherited fromplotSpatialData().- x
SpatialDataobject. IfNULL, the object will be inherited fromplotSpatialData().- ...
Optional aesthetic arguments passed to
geom_sf.
Examples
x <- file.path("extdata", "blobs.zarr")
x <- system.file(x, package="spatialdataR")
x <- readSpatialData(x)
i <- "blobs_points"
p <- plotSpatialData(x)
p + plotPoint(i=i) # simple
#> Coordinate system already present.
#> ℹ Adding new coordinate system, which will replace the existing one.
p + plotPoint(i=i, colour="genes") # discrete
#> Coordinate system already present.
#> ℹ Adding new coordinate system, which will replace the existing one.
p + plotPoint(i, colour="instance_id") # continuous
#> Coordinate system already present.
#> ℹ Adding new coordinate system, which will replace the existing one.