plotGEOmapXY: Plot a projected GEO map

Description Usage Arguments Details Value Author(s) See Also Examples

Description

High Level plot of GEO map

Usage

1
2
3
4
5
6
plotGEOmapXY(MAP, LIM = c(-180, -90, 180, 90),
PROJ = list(), PMAT=NULL,
add = TRUE,  SEL=NULL , GRID = NULL, GRIDcol = 1,
MAPcol = NULL, MAPstyle = NULL, border = NA,
cenlon = 0, shiftlon = 0, linelty = 1,
linelwd = 1, ptpch=".", ptcex=1, NUMB = FALSE, ...)

Arguments

MAP

Map Structure

LIM

Lat-Lon limits

PROJ

Projection list

PMAT

Perspective matrix conversion

add

logical, TRUE= add to existing plot

SEL

Index vector of strokes to be used in plotting, default=NULL(use all that pass other tests)

GRID

logical, TRUE=add grid lines

GRIDcol

color for grid lines

MAPcol

override color for maps

MAPstyle

override plotting style for maps

border

color, add border to polygons, NA=no border

cenlon

center longitude of plot

shiftlon

degrees, rotate longitude

linelty

Line type

linelwd

line width

ptpch

plotting character for strokes (style=1) that are plotted as points

ptcex

character expansion factor for style=1 strokes

NUMB

logical, number the strokes on the map

...

graphical parameters

Details

plotGEOmapXY includes projection of the data, plotGEOmap does not. MAPcol and MAPstyle can be used to override the colors and style in the map-list. These are applied to all the strokes.

For strokes that are of style=1 points are plotted with graphical parameters ptpch="." and ptcex=1 unless otherwise indicated.

Value

Graphical Side Effects

Author(s)

Jonathan M. Lees<jonathan.lees.edu>

See Also

DOTOPOMAPI, addLLXY, plotGEOmap

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
data('japmap', package='geomapdata' )
isel1 = which( japmap$STROKES$code != "i" & japmap$STROKES$num>120 )

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) )
      
gxy = GLOB.XY(PLOC$LAT, PLOC$LON, PROJ)
 PLAT =  pretty(PLOC$LAT)
    PLAT = c(min(PLOC$LAT),
PLAT[PLAT>min(PLOC$LAT) & PLAT<max(PLOC$LAT)],max(PLOC$LAT)) 
  PLON  = pretty(PLOC$LON)
        PLON = c(min(PLOC$LON),
PLON[PLON>min(PLOC$LON) & PLON<max(PLOC$LON)], max(PLOC$LON))
     

plot(gxy$x, gxy$y,  asp=TRUE, ann=FALSE , axes=FALSE)

plotGEOmapXY(japmap,SEL=isel1,  LIM=c(PLOC$LON[1], PLOC$LAT[1],PLOC$LON[2],
     PLOC$LAT[2]) , PROJ=PROJ, add=TRUE )

addLLXY(PLAT,  PLON, PROJ=PROJ, LABS=TRUE, PMAT=NULL, TICS=c(.1,.1) )

###############
####  rotated map
PMAT = rotdelta4(-34)

 plotGEOmapXY(japmap, PMAT=PMAT,SEL=isel1, xpd=TRUE)

GEOmap documentation built on May 2, 2019, 8:56 a.m.