Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

addStipples

Add Stipples to an Existing Plot


Description

Add stipples to an existing plot.

Usage

addStipples (polys, xlim=NULL, ylim=NULL, polyProps=NULL,
   side=1, density=1, distance=4, ...)

Arguments

polys

PolySet that provides the stipple boundaries (required).

xlim

range of X-coordinates.

ylim

range of Y-coordinates.

polyProps

PolyData specifying which polygons to stipple and their properties. par parameters passed as direct arguments supersede these data.

side

one of -1, 0, or 1, corresponding to outside, both sides, or inside, respectively.

density

density of points, relative to the default.

distance

distance to offset points, measured as a percentage of the absolute difference in xlim.

...

additional par parameters for the points function.

Details

This function locates stipples based on the PolySet polys and does not stipple degenerate lines.

Value

PolyData consisting of the PolyProps used to create the plot.

Author(s)

Nicholas M. Boers, Associate Professor – Computer Science
MacEwan University, Edmonton AB
Last modified Rd: 2013-04-10

See Also

Examples

local(envir=.PBSmapEnv,expr={
  oldpar = par(no.readonly=TRUE)
  #--- load the data (if using R)
  if (!is.null(version$language) && (version$language=="R"))
    data(nepacLL,envir=.PBSmapEnv)
  #--- plot a map
  plotMap(nepacLL,xlim=c(-128.66,-122.83),ylim=c(48.00,51.16))
  #--- add stippling
  addStipples(nepacLL,col="purple",pch=20,cex=0.25,distance=2)
  par(oldpar)
})

PBSmapping

Mapping Fisheries Data and Spatial Analysis Tools

v2.73.0
GPL (>= 2)
Authors
Jon T. Schnute [aut], Nicholas Boers [aut], Rowan Haigh [aut, cre], Alex Couture-Beil [ctb], Denis Chabot [ctb], Chris Grandin [ctb], Angus Johnson [ctb], Paul Wessel [ctb], Franklin Antonio [ctb], Nicholas J. Lewin-Koh [ctb], Roger Bivand [ctb]
Initial release
2021-01-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.