segments: gsplot segments

View source: R/segments.R

segmentsR Documentation

gsplot segments

Description

Creates line segments in the plot. See segments for more details.

Usage

segments(object, ...)

Arguments

object

gsplot object

...

Further graphical parameters may also be supplied as arguments. See 'Details'.

Details

Additional graphical parameter inputs:

  • x0, y0 coordinates for the start of the segment

  • x, y coordinates for the end of the segment

  • col, lty, lwd parameters describing the color, type, and width of the segment, respectively

  • legend.name name that appears in the legend, see legend for more legend parameters

See Also

segments

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

USGS-R/gsplot documentation built on April 17, 2023, 8:45 p.m.