File: ggdraw.Rd

package info (click to toggle)
r-cran-cowplot 1.1.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,564 kB
  • sloc: sh: 13; makefile: 5
file content (29 lines) | stat: -rw-r--r-- 864 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/draw.R
\name{ggdraw}
\alias{ggdraw}
\title{Set up a drawing layer on top of a ggplot}
\usage{
ggdraw(plot = NULL, xlim = c(0, 1), ylim = c(0, 1), clip = "off")
}
\arguments{
\item{plot}{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 \code{\link[=as_grob]{as_grob()}}.}

\item{xlim}{The x-axis limits for the drawing layer.}

\item{ylim}{The y-axis limits for the drawing layer.}

\item{clip}{Should drawing be clipped to the set limits? The default is no ("off").}
}
\description{
Set up a drawing layer on top of a ggplot.
}
\examples{
library(ggplot2)

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