sl.plot.naturalearth: Plot Natural Earth Data

Description Usage Arguments Details Author(s) References See Also Examples

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

Description

Plot Natural Earth data.

Usage

1
sl.plot.naturalearth(plot.init.res=NULL, load.res=NULL, what="coastline", resolution="medium", lines.col="black", lwd=1, lty=1, fill.col="grey", fill.refine.boundary=TRUE, fill.refine.boundary.precision=1, polygon.borders=FALSE, points.text=TRUE, points.text.col="black", points.text.cex=1, points.text.adj=NULL, points.text.pos=NULL, points.text.offset=0.5, points.text.vfont=NULL, points.text.font=NULL, points.points=FALSE, points.pch=20, points.col="black", points.cex=1, ignore.visibility=FALSE, naturalearth.dir="~/naturalearthdata", verbose=TRUE)

Arguments

plot.init.res

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

load.res

a list as returned by sl.load.naturalearth. If NULL (default), sl.load.naturalearth is invoked automatically to load the data specified by the arguments 'what' and 'resolution'.

what

a character or character vector specifying which type of Natural Earth data to plot, e.g., 'coastline'. To list all possible values for the specified resolution, set what='list'. If 'what' contains more than one element, they are plotted in the order they are provided, that is, the last one will always be in the foreground. Ignored if load.res is not NULL.

resolution

a character or character vector sepcifying which resolution(s) to use. Possible values are 'coarse' (1:110Mio), 'medium' (1:50Mio; default), and 'fine' (1:10Mio). Ignored if load.res is not NULL.

lines.col

a colour or vector of colours to be used for any lines.

lwd

a scalar or numeric vector specifying the line width.

lty

a line type or vector of line types.

fill.col

a colour or vector of colours to be used for filling polygons.

fill.refine.boundary

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

fill.refine.boundary.precision

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

polygon.borders

a logical value or vector of logical values indicating whether or not to plot lines along polygon edges.

points.text

a logical value or vector of logical values indicating whether names associated with point objects shall be plotted.

points.text.col

a colour or vector of colours to be used for text.

points.text.cex

a scalar or numeric vector specifying the size scaling factor for text.

points.text.adj

a numeric vector of length 2 with values in [0, 1] specifying the x and y adjustment of text.

points.text.pos

a position specifier or vector of position specifiers for the text. If specified this overrides any adj value given. Values of 1, 2, 3 and 4, respectively indicate positions below, to the left of, above and to the right of the specified coordinates.

points.text.offset

a scalar or numeric vector. When points.text.pos is specified, this value / these values give(s) the offset of the text from the specified coordinate in fractions of a character width.

points.text.vfont

NULL for the current font family, or a character vector of length 2 for Hershey vector fonts. The first element of the vector selects a typeface and the second element selects a style.

points.text.font

If vfont = NULL, the font to be used, possibly a vector. Defaults to the values of the global graphical parameters in par().

points.points

a logical value or vector of logical values indicating whether symbols shall be plotted at the locations of point objects.

points.pch

a point 'character' (or vector thereof).

points.col

a point colour (or vector thereof).

points.cex

a point size scaling factor (or vector thereof).

ignore.visibility

a logical value indicating whether or not objects shall be attempted to be drawn even if they are invisible, that is, outside the plot domain.

naturalearth.dir

a character specifying the local Natural Earth data directory. If data are downloaded from the internet, they will be save to this directory; if it does not yet exist, it will be created.

verbose

a logical value indicating whether or not to print more information.

Details

This function, together with sl.load.naturalearth, enables using the openly available and free-to-use Natural Earth data (http://www.naturalearthdata.com) - including coastlines, rivers, land and ocean polygons, and much more - in spheRlab.

If needed, this function invokes sl.plot.naturalearth to load (and possibly download from the internet) Natural Earth data before plotting. In this case, the package rgdal is needed to read the shape file(s).

Author(s)

Helge Goessling

References

http://www.naturalearthdata.com

See Also

sl.load.naturalearth

Examples

1
2
3
4
5
6
7
# plot coastlines at coarse resolution:
pir = sl.plot.init()
sl.plot.naturalearth(pir,what="coastline",resolution="coarse")
sl.plot.end(pir)

# list all possible 'what' values for fine resolution:
sl.plot.naturalearth(what="list",resolution="fine")

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