Seurat (version 2.3.4)

AugmentPlot: Augments ggplot2 scatterplot with a PNG image.

Description

Used in to creating vector friendly plots. Exported as it may be useful to others more broadly

Usage

AugmentPlot(plot1, imgFile)

Arguments

plot1

ggplot2 scatterplot. Typically will have only labeled axes and no points

imgFile

location of a PNG file that contains the points to overlay onto the scatterplot.

Value

ggplot2 scatterplot that includes the original axes but also the PNG file

Examples

Run this code
# NOT RUN {
data("pbmc_small")
p <- PCAPlot(pbmc_small, do.return = TRUE)
ggsave(filename = 'pcaplot.png', plot = p, device = png)
pmod <- AugmentPlot(plot1 = p, imgFile = 'pcaplot.png')
pmod
# }

Run the code above in your browser using DataLab