powered by
Set up a drawing layer on top of a ggplot.
ggdraw(plot = NULL, xlim = c(0, 1), ylim = c(0, 1))
The plot to use as a starting point. Can be a ggplot2 plot, an arbitrary grob or gtable, or a recorded base-R plot, as in plot_to_gtable().
plot_to_gtable()
The x-axis limits for the drawing layer.
The y-axis limits for the drawing layer.
# NOT RUN { p <- ggplot(mpg, aes(displ, cty)) + geom_point() ggdraw(p) + draw_label("Draft", colour = "grey", size = 120, angle = 45) # }
Run the code above in your browser using DataLab