plot_graticule | R Documentation |
Plot a SpatGraticule. You can create a SpatGraticule with graticule
.
## S4 method for signature 'SpatGraticule,missing'
plot(x, y, background=NULL, col="black", mar=NULL, labels=TRUE,
retro=FALSE, lab.loc=c(1,1), lab.lon=NULL, lab.lat=NULL, lab.cex=0.65,
lab.col="black", off.lat=0.25, off.lon=0.25, box=FALSE, box.col="black",
add=FALSE, ...)
x |
SpatRaster or SpatVector |
y |
missing or positive integer or name indicating the layer(s) to be plotted |
background |
background color. If NULL, no background is drawn |
mar |
numeric vector of length 4 to set the margins of the plot. To make space for the legend you may use something like |
col |
character. Color for the graticule lines |
labels |
logical. If |
retro |
logical. If |
lab.loc |
numeric. The first number indicates where the longitude graticule labels should be drawn (1=bottom, 2=top, NA=not drawn, any other number=top and bottom). The second number indicates where the latitude graticule labels should be drawn (1=left, 2=right, NA=not drawn, any other number=left and right) |
lab.lon |
positive integers between 1 and the number of labels, indicating which longitude graticule labels should be included |
lab.lat |
positive integers between 1 and the number of labels, indicating which latitude graticule labels should be included |
lab.cex |
double. size of the label font |
lab.col |
character. color of the labels |
off.lon |
numeric. longitude labels offset |
off.lat |
numeric. latitude labels offset |
box |
logical. If |
box.col |
character. color of the outer lines of the graticule if |
add |
logical. Add the graticule to the current plot? |
... |
additional graphical arguments passed to |
graticule
, plot
,
points
, lines
, polys
, image
, scatterplot
,
scale bar: sbar
, north arrow: north
g <- graticule(60, 30, crs="+proj=robin")
plot(g, background="azure", col="red", lty=2, box=TRUE)
plot(g, background="azure", col="light gray", lab.loc=c(1,2),
lab.lon=c(2,4,6), lab.lat=3:5, lty=3, retro=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.