ggdraw {cowplot}R Documentation

Set up a drawing layer on top of a ggplot

Description

Set up a drawing layer on top of a ggplot

Usage

ggdraw(plot = NULL, xlim = c(0, 1), ylim = c(0, 1))

Arguments

plot

The plot to use as a starting point. Can be a ggplot2 plot, an arbitrary gtable, or a recorded base-R plot, as in plot_grid().

xlim

The x-axis limits for the drawing layer.

ylim

The y-axis limits for the drawing layer.

Examples

p <- ggplot(mpg, aes(displ, cty)) + geom_point()
ggdraw(p) + draw_label("Draft", colour = "grey", size = 120, angle = 45)

[Package cowplot version 0.8.0 Index]