callouts: gsplot callouts

View source: R/callouts.R

calloutsR Documentation

gsplot callouts

Description

Add callout lines and text to a plot.

Default for adding callouts to a plot.

Usage

callouts(object, ...)

callouts.default(x, y = NULL, labels = NA, length = 0.1, angle = "auto",
  cex = par()$cex, lwd = par()$lwd, lty = par()$lty, ...)

Arguments

object

gsplot object

...

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

x

values for callout location

y

values for callout location

labels

text to be added to callout

length

relative (percentage of window width and height) distance for callout

angle

callout line angle

cex

passed to text for font size formatting

lwd

passed to arrows for line weights

lty

passed to arrows for line type

Details

Additional graphical parameter inputs:

  • x numeric value for x-coordinate of callout

  • y numeric value for y-coordinate of callout

  • labels text to be added to callout

  • length relative (percentage of window width and height) distance for callout

  • angle callout line angle

Examples

gs <- gsplot()
gsNew <- points(gs, y=1, x=2, xlim=c(0,3),ylim=c(0,3),
            col="blue", pch=18, legend.name="Points")
gsNew <- callouts(gsNew, 2, 1, labels='dog')
gsNew

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