
Plot Image from SpatialMap Objects
plotImage.Rd
Plot Image from SpatialMap Objects
Arguments
- object
A SpatialMap or Region object
- markers
The markers to plot
- colors
The colors to use. Must be same length as markers input
- background
Specify the background color (black or white)
- zoom.level
Specify a zoom level corresponding to the Enable Visualizer tilebucket. Higher is more zoomed out
- rescale
Thresholds for rescaling. Must be given as a list of length-2 vectors of threshold values, min and max, per marker (or
NULL
, for auto-thresholding) in the form below. If only one list entry is given, it will be applied to all markers uniformly:list( c(min.val, max.val), NULL, ...)
- trim
Whether to trim the color scale. Applied after dynamic thresholding. Must be given as a list of length-2 vectors of quantiles, low and high, per marker (or
NULL
, for no trimming) in the form below. If only one list entry is given, it will be applied to all markers uniformly:list( c(trim.low, trim.high), NULL, ...)
- window
Optional filtering by position (0-indexed) in the form:
list( c(x_min, x_max), c(y_min, y_max) )
- bucket
Deprecated. Image tiles are now pulled via Portal instead of S3.
- ...
Arguments passed on to
plotImage.Region
region
A Region object
text_size
The text size for the overlay indicating marker colors. This will appear in the bottom right corner of the image. Set to 0 for no text.
scalebar
Length of the scale bar (in microns) to overlay. This will appear in the bottom left corner of the image. Set to 0 for no scale bar.
gg.output
Whether or not to use
ggplot2
to render the output. This can be clunky or slow for larger images, which are rastered on the fly.connection
The database connection object
schema
The database schema name
ds
A date-stamp of today plus
ds
(an integer) is used to filter Snowflake queries.
Value
A ggplot2 object, or a list of ggplot2 objects if you passed a SpatialMap object with multiple Regions. May
also return a raster image or a list of raster images, depending on the value passed to gg.output
.
Details
See vignette("Tutorial_Plotting_with_SpatialMap")
for examples of how to use this function.