plot_PolySet: Plot a projected PolySet

View source: R/mapping.R

plot_PolySetR Documentation

Plot a projected PolySet

Description

Plot a projected PolySet

Usage

plot_PolySet(x, projection, add = FALSE, ...)

Arguments

x

A PolySet (see PBSmapping)

projection

a globeproj objcet

add

logical; If TRUE, add to existing plot

...

Additional parameters passed on to sp::plot

Details

This function is a legacy method for plotting data from the PBSmapping package, with

data(worldLL, package = "PBSmapping")
plot_PolySet(worldLL, old_globeproj("longlat"), add = FALSE)

To avoid a dependency on the PBSmapping package, the example below constructs a synthetic object of the same format.

Value

An (invisible) sp object of projected lines

See Also

old_globeproj()

Examples

world_example <- data.frame(
  PID = c(0L, 0L, 0L, 1L, 1L),
  POS = c(1L, 2L, 3L, 1L, 2L),
  X = c(10, 20, 30, 15, 25),
  Y = c(10, 15, 70, -40, -50)
)
plot_PolySet(world_example, old_globeproj("longlat"), add = FALSE)

fmesher documentation built on July 1, 2024, 5:07 p.m.