if (FALSE) {
library(geomapdata)
#### need to download and install ETOPO data
### data(ETOPO5)
load(ETOPO5)
PLOC=list(LON=c(137.008, 141.000),LAT=c(34.000, 36.992),
x=c(137.008, 141.000), y=c(34.000, 36.992) )
PROJ = setPROJ(type=2, LAT0=mean(PLOC$y) , LON0=mean(PLOC$x) )
COLS = settopocol()
JMAT = GEOTOPO(ETOPO5, PLOC, PROJ, COLS$calcol, nx=1000, ny=1000, nb=8, mb=8, hb=12, PLOT=TRUE)
############ this plot can be duplicated by using the output or GEOTOPO
PMAT = persp(JMAT$xo, JMAT$yo, JMAT$IZ$z, theta = 0, phi = 90, r=4000,
col=JMAT$Cmat[1:(JMAT$Dcol[1]-1), 1:(JMAT$Dcol[2]-1)] , scale = FALSE,
ltheta = 120, lphi=60, shade = 0.75, border = NA, expand=0.001, box = FALSE )
}
Run the code above in your browser using DataLab