Tick marks for Square plot
Lat-Lon Tick marks and grid for Square plot
sqrTICXY(prsurf, proj, side = c(1, 2, 3, 4), PMAT=NULL, LLgrid = TRUE, col = "black", colt = "black", font=5, cex=1, lty=2, lwd=1, pcex=1, TICS=NULL)
prsurf
: list with x, yproj
: projectionside
: vector, which sides to plot, 1=bottom, 2=left, 3=top, 4=rightPMAT
: projection matrix from perspLLgrid
: logical, whether to add gridcol
: color for gridcolt
: color for textfont
: default=2, font for labelscex
: character expansion for tic labelslty
: Line type for lines, default=2lwd
: Line width for lines, default=1pcex
: character expansion for tics, pch=2TICS
: list(lat, lon) this will replace the defaultGraphical side effects
Jonathan M. Leesjonathan.lees@unc.edu
addLLXY, plotGEOmapXY
KAMlat = c(48.5, 65) KAMlon = c(150, 171) proj = setPROJ( 2, LAT0=mean(KAMlat) , LON0=mean(KAMlon) ) PLOC=list(LON=KAMlon,LAT=KAMlat) PLON = seq(from=KAMlon[1], to=KAMlon[2], by=2) PLAT = seq(from=KAMlat[1], to=KAMlat[2], by=2) proj = setPROJ(2, LON0=mean(KAMlon), LAT0=mean(KAMlat)) library(geomapdata) data(worldmap) plotGEOmapXY(worldmap, LIM=c(KAMlon[1], KAMlat[1], KAMlon[2], KAMlat[2]), PROJ =proj, axes=FALSE, xlab="", ylab="" ) kbox = GLOB.XY( KAMlat,KAMlon, proj) sqrTICXY(kbox , proj, side=c(1,2,3,4), LLgrid=TRUE, col=grey(.7) ) ############# more detailed map: data(kammap) plotGEOmapXY(kammap, LIM=c(KAMlon[1], KAMlat[1], KAMlon[2], KAMlat[2]), PROJ =proj, axes=FALSE, xlab="", ylab="" ) kbox = GLOB.XY( KAMlat,KAMlon, proj) sqrTICXY(kbox , proj, side=c(1,2,3,4), LLgrid=TRUE, col=grey(.7) )
Useful links