Horizontal Zebra Scale
Plot a zebra style horizontal scale on a projected map.
zebra(x, y, Dx, dx, dy, lab = "", pos=1, col = c("black", "white"), cex = 1, textcol="black", xpd=TRUE, PMAT = NULL)
x
: x-coordinate of left cornery
: y-coordinate of left cornerDx
: distance in x, kmdx
: distance for zebra stripes in xdy
: thickness in kmlab
: labelspos
: position of text, 1=below, 3=above, as in parcol
: 2-vector of colors, for the alternating barscex
: character expansiontextcol
: color for the textxpd
: logical, graphic parameter for clipping (see par)PMAT
: 3D projection matrix from perspPlots a zebra style kilometer scale on the current plot
Graphical Side effect
Jonathan M. Leesjonathan.lees@unc.edu
library(geomapdata) data(USAmap) USALL=list() USALL$lat=c(24.72853,49.62741) USALL$lon=c(229.29389,296.41803) ## set UTM projection PROJ = setPROJ(type = 2, LAT0 =mean(USALL$lat), LON0 = mean(USALL$lon) ) #### plot with UTM projection: plotGEOmapXY(USAmap, LIM= c(USALL$lon[1], USALL$lat[1], USALL$lon[2], USALL$lat[2] ) , PROJ=PROJ, add=FALSE, shiftlon=0) zeb=list() zeb$x=c(197.727896066) zeb$y=c(-1155.81158234) zebra(zeb$x[1],zeb$y[1], 1000, 100, 60, lab="Km", cex=.6)
Useful links