mapGrid {oce} | R Documentation |
Plot longitude and latitude grid on an existing map.
mapGrid(dlongitude = 15, dlatitude = 15, longitude, latitude, col = "darkgray", lty = "solid", lwd = 0.5 * par("lwd"), polarCircle = 0, longitudelim, latitudelim, debug = getOption("oceDebug"))
dlongitude |
increment in longitude, ignored if |
dlatitude |
increment in latitude, ignored if |
longitude |
vector of longitudes, or |
latitude |
vector of latitudes, or |
col |
colour of lines |
lty |
line type |
lwd |
line width |
polarCircle |
a number indicating the number of degrees of latitude extending from the poles, within which zones are not drawn. |
longitudelim |
optional argument specifying suggested longitude limits
for the grid. If this is not supplied, grid lines are drawn for the
whole globe, which can yield excessively slow drawing speeds for
small-region plots. This, and |
latitudelim |
similar to |
debug |
a flag that turns on debugging. Set to 1 to get a moderate amount of debugging information, or to 2 to get more. |
This is somewhat analogous to grid
, except that the
first two arguments of the latter supply the number of lines in the grid,
whereas the present function has increments for the first two arguments.
At the moment, the function cannot determine which lines might
work with labels on axes, but this could perhaps be added later, making
this more analogous with grid
.
Dan Kelley
A map must first have been created with mapPlot
.
Other functions related to maps: lonlat2map
,
lonlat2utm
, map2lonlat
,
mapArrows
, mapAxis
,
mapContour
,
mapDirectionField
, mapImage
,
mapLines
, mapLocator
,
mapLongitudeLatitudeXY
,
mapPlot
, mapPoints
,
mapPolygon
, mapScalebar
,
mapText
, mapTissot
,
oceCRS
, shiftLongitude
,
utm2lonlat
## Not run: library(oce) data(coastlineWorld) mapPlot(coastlineWorld, type='l', grid=FALSE, longitudelim=c(-80, 10), latitudelim=c(0, 120), projection="+proj=ortho") mapGrid(15, 15, polarCircle=15) ## End(Not run)