sqrTICXY: Tick marks for Square plot

View source: R/sqrTICXY.R

sqrTICXYR Documentation

Tick marks for Square plot

Description

Lat-Lon Tick marks and grid for Square plot

Usage

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)

Arguments

prsurf

list with x, y

proj

projection

side

vector, which sides to plot, 1=bottom, 2=left, 3=top, 4=right

PMAT

projection matrix from persp

LLgrid

logical, whether to add grid

col

color for grid

colt

color for text

font

default=2, font for labels

cex

character expansion for tic labels

lty

Line type for lines, default=2

lwd

Line width for lines, default=1

pcex

character expansion for tics, pch=2

TICS

list(lat, lon) this will replace the default

Value

Graphical side effects

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu>

See Also

addLLXY, plotGEOmapXY

Examples


 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) )
   



GEOmap documentation built on Sept. 1, 2023, 5:09 p.m.