-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathsegments.Rd
More file actions
36 lines (34 loc) · 1.09 KB
/
segments.Rd
File metadata and controls
36 lines (34 loc) · 1.09 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
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/segments.R
\name{segments}
\alias{segments}
\title{gsplot segments}
\usage{
segments(object, ...)
}
\arguments{
\item{object}{gsplot object}
\item{\dots}{Further graphical parameters may also be supplied as arguments. See 'Details'.}
}
\description{
Creates line segments in the plot. See \code{\link[graphics]{segments}} for more details.
}
\details{
Additional graphical parameter inputs:
\itemize{
\item{\code{x0, y0}} {coordinates for the start of the segment}
\item{\code{x, y}} {coordinates for the end of the segment}
\item{\code{col, lty, lwd}} {parameters describing the color, type, and width of the segment, respectively}
}
}
\examples{
gs <- gsplot()
gsNew <- points(gs, y=1, x=2, xlim=c(0,NA),ylim=c(0,NA),
col="blue", pch=18, legend.name="Points")
gsNew <- lines(gsNew, c(3,4,3), c(2,4,6), legend.name="Lines")
gsNew <- abline(gsNew, b=1, a=0, legend.name="1:1")
gsNew <- legend(gsNew, location="topleft",title="Awesome!")
gsNew <- grid(gsNew)
gsNew <- segments(gsNew, x0=2, y0=0.75, y1=1.25)
gsNew
}