addLLXY {GEOmap} | R Documentation |
Add Lat-Lon points using projection
addLLXY(lats, lons, PROJ = PROJ, PMAT = NULL, col = gray(0.7), GRID = TRUE, GRIDcol = 1, LABS = NULL, LABcol = 1, BORDER = NULL, TICS = c(1, 1), xpd=TRUE)
lats |
Latitudes in Degrees |
lons |
Longitude in Degrees |
PROJ |
Map Projection list |
PMAT |
Perspective matrix conversion |
col |
color |
GRID |
logical, TRUE=add grid lines |
GRIDcol |
color for grid lines |
LABS |
vector of labels |
LABcol |
color for labels |
BORDER |
add border |
TICS |
tick marks |
xpd |
logical, expand plotting region (see par) |
Graphical Side Effects
Jonathan M. Lees<jonathan.lees.edu>
plotGEOmapXY, sqrTICXY
library(geomapdata) data(fujitopo) data(japmap) PLOC=list(LON=range(c( japmap$STROKES$LON1,japmap$STROKES$LON2) ), LAT=range(c( japmap$STROKES$LAT1,japmap$STROKES$LAT2) )) PLOC$x = PLOC$LON PLOC$y = PLOC$LAT PROJ = setPROJ(type=2, LAT0=mean(PLOC$y) , LON0=mean(PLOC$x) ) plotGEOmapXY(japmap, PROJ=PROJ, add=FALSE, axes=FALSE, xlab="", ylab="") A = PLOC PLAT = pretty(A$LAT) PLAT = c(min(A$LAT), PLAT[PLAT>min(A$LAT) & PLAT<max(A$LAT)],max(A$LAT)) PLON = pretty(A$LON) PLON = c(min(A$LON), PLON[PLON>min(A$LON) & PLON<max(A$LON)], max(A$LON)) addLLXY(PLAT, PLON, PROJ=PROJ, LABS=TRUE, PMAT=NULL, TICS=c(.1,.1) ) ###############