AugmentPlot: Augments ggplot2-based plot with a PNG image.

View source: R/visualization.R

AugmentPlotR Documentation

Augments ggplot2-based plot with a PNG image.

Description

Creates "vector-friendly" plots. Does this by saving a copy of the plot as a PNG file, then adding the PNG image with annotation_raster to a blank plot of the same dimensions as plot. Please note: original legends and axes will be lost during augmentation.

Usage

AugmentPlot(plot, width = 10, height = 10, dpi = 100)

Arguments

plot

A ggplot object

width, height

Width and height of PNG version of plot

dpi

Plot resolution

Value

A ggplot object

Examples

## Not run: 
data("pbmc_small")
plot <- DimPlot(object = pbmc_small)
AugmentPlot(plot = plot)

## End(Not run)


Seurat documentation built on May 29, 2024, 4:20 a.m.