plotXY: Plot spatial image with data overlay

View source: R/utils.R

plotXYR Documentation

Plot spatial image with data overlay

Description

A helper function to overlay data onto a spatial image.

Usage

plotXY(df, col, img = NULL)

Arguments

df

A data.frame storing the data to plot.

col

character. A column of df to use for overlay onto the image.

img

a raster object representing a bitmap image.

Value

A ggplot.

Examples

 gene <- rep(c("Cd44", "Cd8b1", "Cd79b"), each = 2)
 x <- c(1693, 1701, 1820, 3188, 1631, 1881)
 y <- c(1831, 1666, 1855, 6612, 1533, 942)
 df <- data.frame(gene = gene, x = x, y = y)
 plotXY(df, "gene")

ccb-hms/MerfishData documentation built on Aug. 19, 2022, 8:55 a.m.