paxes {autoimage} | R Documentation |
Display axes for projected coordinates
Description
paxes
addes x and y axes to an existing plot for projected
coordinates.
Usage
paxes(proj, xlim, ylim, xaxp, yaxp, grid = TRUE, axis.args, ...)
Arguments
proj |
A character string indicating what projection should be
used for the included |
xlim |
A vector with the minimum and maximum value of the x
coordinates. Taken from |
ylim |
A vector with the minimum and maximum value of the y
coordinates. Taken from |
xaxp |
A vector of the form |
yaxp |
A vector of the form |
grid |
A logical value indicating whether grid lines should be
displayed with the axes. Default is |
axis.args |
A named list with components matching the
arguments of |
... |
Other arguments passed to the |
Details
The mapproject
function is used for
projection.
axis.args
should be a named list matching the arguments
of axis
. The exception is that
xat
and yat
can be specified to induce
different spacing of the ticks on the x and y axes. Thus,
the at
argument is ignored and replaced by xat
and
yat
, as appropriate.
See Also
Examples
data(narccap)
# plot image using mercator projection (w/o axes)
pimage(lon, lat, tasmax[,,1], proj = "mercator", axes = FALSE)
# add axes with grey grid lines, blue text, and custom spacing
paxes("mercator", xlim = range(lon), ylim = range(lat),
col = "grey",
axis.args = list(col.axis = "blue",
xat = c(-160, -100, -90, -80, -20)))