plotSpatialOverlay: overlay plots

View source: R/plottingBasics.R

plotSpatialOverlayR Documentation

overlay plots

Description

overlay plots

Usage

plotSpatialOverlay(
  overlay,
  colorBy = "sampleID",
  hiRes = TRUE,
  alpha = 1,
  legend = TRUE,
  scaleBar = TRUE,
  image = TRUE,
  fluorLegend = FALSE,
  ...,
  corner = "bottomright",
  scaleBarWidth = 0.2,
  scaleBarMicrons = NULL,
  scaleBarColor = NULL,
  scaleBarFontSize = 6,
  scaleBarLineSize = 1.5,
  textDistance = 2
)

Arguments

overlay

SpatialOverlay object

colorBy

annotation to color by

hiRes

generated figures are either high resolution or print quickly. Note: hiRes and outline ggplots use fill, lowRes uses color

alpha

opacity of overlays

legend

should legend be plotted

scaleBar

should scale bar be plotted

image

should image be plotted, image must be added to SpatialOverlay object

fluorLegend

should viz marker on the image be added to legend

...

additional parameters for scale bar line & text, will affect both

corner

where in the figure should the scale bar be printed. Options: "bottomright" "topright" "bottomleft" "topleft" "bottomcenter" "topcenter"

scaleBarWidth

percent of total figure the scale bar should take up

scaleBarMicrons

specific microns to set scale bar at, overrides scaleBarWidth if set

scaleBarColor

scale bar & text color

scaleBarFontSize

font size

scaleBarLineSize

width of line

textDistance

text's distance from scale bar.

Value

gp

Note

hiRes and outline ggplots use fill, lowRes uses color

Examples


muBrain <- readRDS(unzip(system.file("extdata", "muBrainSubset_SpatialOverlay.zip",
                                    package = "SpatialOmicsOverlay")))
                             
plotSpatialOverlay(overlay = muBrain, legend = FALSE,  
                   hiRes = FALSE, scaleBar = FALSE)


Nanostring-Biostats/SpatialOmicsOverlay documentation built on April 20, 2024, 5:36 a.m.