View source: R/plottingBasics.R
fluorLegend | R Documentation |
Creates legend that can be overlayed on image using cowplot
.
fluorLegend(overlay, nrow = 4, textSize = 10, boxColor = "grey", alpha = 0.25)
overlay |
SpatialOverlay |
nrow |
number of rows in the legend. Most studies have 4 which is where the values came from: 1 = horizontal legend, 4 = vertical legend, 2 = box legend |
textSize |
font size |
boxColor |
color of box behind legend |
alpha |
alpha value of box behind legend |
gp of fluorescence legend
muBrain <- readRDS(unzip(system.file("extdata", "muBrainSubset_SpatialOverlay.zip",
package = "SpatialOmicsOverlay")))
# image <- downloadMouseBrainImage()
# muBrain <- addImageOmeTiff(overlay = muBrain,
# ometiff = image, res = 8)
gp <- plotSpatialOverlay(overlay = muBrain,
hiRes = FALSE, scaleBar = FALSE)
legend <- fluorLegend(muBrain, nrow = 2, textSize = 3, boxColor = "red")
cowplot::ggdraw() +
cowplot::draw_plot(gp) +
cowplot::draw_plot(legend, scale = 0.12, x = -0.3, y = -0.25)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.