plot.s2polygon: Plot the outline of a spherical polygon

View source: R/s2plotting.R

plot.s2polygonR Documentation

Plot the outline of a spherical polygon

Description

Plot the outline of a spherical polygon of class "s2polygon" in base graphics via the globe package.

Usage

## S3 method for class 's2polygon'
plot(
  x,
  eps = pi * s2radius(x),
  ...,
  add = FALSE,
  coast = FALSE,
  longrid = 30,
  latgrid = 30,
  flat = FALSE
)

Arguments

x

Polygon of class "s2polygon" to plot, a list of loops on the sphere or something interpretable as such.

eps

Maximum distance between consecutive plotted vertices in the polygon. For vertices separated by more than eps interpolating points will be inserted. Default value corresponds to no interpolation.

...

parameters passed to globe::globelines() to control view point (eye), orientation (top), and grapical parameters such as line color (col), line width (lwd) etc.

add

Logical to add outline of polygon to existing plot.

coast

Logical to add the outline of the worlds coast lines.

longrid

Numeric defining a grid of longitude lines to be plotted if add = FALSE. Either a vector of numbers between -180 and 180 or a single numeric used as a stepsize between consecutive longitude lines. Value of zero or NULL disables longitude lines.

latgrid

Numeric defining a grid of latitude lines to be plotted if add = FALSE. Either a vector of numbers between -90 and 90 or a single numeric used as a stepsize between consecutive latitude lines. Value of zero or NULL disables latitude lines.

flat

Logical to plot on a flat earth map (simply projecting lon,lat values to a rectangular region (-180,180)x(-90,90) using globe::flatearth()).

Value

NULL (invisibly)


spatstat/spatstat.sphere documentation built on Jan. 27, 2023, 2:59 a.m.