-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy patharrows.Rd
More file actions
43 lines (42 loc) · 1.51 KB
/
arrows.Rd
File metadata and controls
43 lines (42 loc) · 1.51 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/arrows.R
\name{arrows}
\alias{arrows}
\title{gsplot arrows}
\usage{
arrows(object, ...)
}
\arguments{
\item{object}{gsplot object}
\item{\dots}{Further graphical parameters may also be supplied as arguments. See 'Details'.}
}
\description{
Creates an arrow pointing at a specified plot location. See \code{\link[graphics]{arrows}} for more details.
}
\details{
Often used with \code{\link{text}} to label a feature on the plot. Additional graphical parameter inputs:
\itemize{
\item{\code{x0, y0}} {position of the arrow tail}
\item{\code{x, y}} {position of the arrow head}
\item{\code{col, lty, lwd}} {parameters describing the color, type, and width of the arrow, respectively}
\item{\code{legend.name}} {name that appears in the legend, see \code{\link{legend}} for more legend parameters}
}
}
\examples{
gs <- gsplot() \%>\%
points( y=c(3,1,2), x=1:3, xlim=c(0,NA),ylim=c(0,NA),
col="blue", pch=18, legend.name="Points", xlab="Index") \%>\%
lines(c(3,4,3), c(2,4,6), legend.name="Lines", ylab="Data") \%>\%
abline(b=1, a=0, legend.name="1:1") \%>\%
legend(location="topleft",title="Awesome!") \%>\%
grid() \%>\%
error_bar(x=1:3, y=c(3,1,2), y.high=c(0.5,0.25,1), y.low=0.1) \%>\%
error_bar(x=1:3, y=c(3,1,2), x.low=.2, x.high=.2, col="red",lwd=3) \%>\%
arrows(x0=0.75, y0=2, x1=1, y1=2.8, lwd=2) \%>\%
title("Graphing Fun") \%>\%
text(.75,1.75,labels="Weird data")
gs
}
\seealso{
\code{\link[graphics]{arrows}}
}