sl.plot.polygon: Plot Polygon

Description Usage Arguments Details Author(s) See Also Examples

View source: R/sl.plot.polygon.R

Description

Plot a polygon into a spheRlab plot.

Usage

1
sl.plot.polygon(plot.init.res, lon, lat, fill = TRUE, col.fill = "black", border = FALSE, col.border = col.fill, border.lwd = 0.01, border.lty = 1, ignore.visibility = FALSE, remove.identical.neighbours = TRUE, refine.boundary = TRUE, refine.boundary.precision = 1)

Arguments

plot.init.res

a spheRlab plot specifics list as returned by sl.plot.init (or a variant thereof).

lon

a vector of length N specifying the longitudes of the polygon vertices.

lat

a vector of length N specifying the latitudes of the polygon vertices.

fill

a logical value indicating whether or not to fill the polygon.

col.fill

the fill colour. Used only if fill=TRUE.

border

a logical value indicating whether or not to draw the polygon edges.

col.border

the border (edge) line colour. Used only if border=TRUE.

border.lwd

a scalar specifying the border (edge) line width. Used only if border=TRUE.

border.lty

the border (edge) line type. Used only if border=TRUE.

ignore.visibility

a logical value indicating whether or not the polygon shall be attempted to be drawn completely even if it's classified partly or fully invisible, that is, outside the plot domain.

remove.identical.neighbours

a logical value indicating whether or not identical neighbours shall be removed from the polygon vertices before plotting.

refine.boundary

a logical value indicating whether or not to refine truncated polygons along curved plot boundaries (in polar projection).

refine.boundary.precision

a scalar specifying the precision (in degrees) for the refinement of truncated polygons along curved plot boundaries (in polar projection).

Details

This is one of the lowest-level plotting functions of spheRlab. First the visibility of the polygon vertices is checked, which depends on the projection and plot domain boundaries. A polygon for which all vertices are invisible is not drawn. (This implies that a polygon is not drawn if all vertices are invisible, even if some other part of the polygon is visible.) Then for two partly visible edges an intersection point with the boundary is computed and the two intersection points are added to the polygon, replacing the (one or more) invisible vertices. The resulting polygon is then drawn, if applicable optionally after refinement of the truncation edge (see argument 'refine.boundary').

Author(s)

Helge Goessling

See Also

sl.plot.lines, sl.plot.points

Examples

1
## To be provided ...

helgegoessling/spheRlab documentation built on Sept. 29, 2017, 6:36 a.m.