Permalink
Browse files

Update annotate docs

  • Loading branch information...
1 parent 4f3d34b commit 0f387a2360c225fcf292a4bb0b811db2356503fe @hadley hadley committed Jun 8, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 man/annotate.Rd
View
@@ -3,8 +3,7 @@
\title{Create an annotation layer.}
\usage{
annotate(geom, x = NULL, y = NULL, xmin = NULL,
- xmax = NULL, ymin = NULL, ymax = NULL, ...,
- facet = NULL)
+ xmax = NULL, ymin = NULL, ymax = NULL, ...)
}
\arguments{
\item{geom}{name of geom to use for annotation}
@@ -32,11 +31,14 @@
\examples{
p <- ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point()
p + annotate("text", x = 4, y = 25, label = "Some text")
+p + annotate("text", x = 2:5, y = 25, label = "Some text")
p + annotate("rect", xmin = 3, xmax = 4.2, ymin = 12, ymax = 21,
alpha = .2)
p + annotate("segment", x = 2.5, xend = 4, y = 15, yend = 25,
colour = "blue")
p + annotate("pointrange", x = 3.5, y = 20, ymin = 12, ymax = 28,
colour = "red", size = 1.5)
+
+p + annotate("text", x = 2:3, y = 20:21, label = c("my label", "label 2"))
}

0 comments on commit 0f387a2

Please sign in to comment.