plotmap {kfsst} | R Documentation |
Plots a map within given rectangular region showing land areas as colored polygons. Requires the mapping utility GMT.
plotmap(x1, x2, y1, y2, resolution=3, grid=FALSE, add=FALSE, save=FALSE, landcolor="darkgreen", seacolor="lightblue", zoom=FALSE)
x1 |
Longitude of lower left corner of rectangle |
x2 |
Longitude of upper right corner of rectangle |
y1 |
Latitude of lower left corner of rectangle |
y2 |
Latitude of upper right corner of rectangle |
resolution |
Map resolution, integer: 1 (highly detailed) to 5 (crude) |
grid |
Whether to plot grid lines on map |
add |
Whether to add polygons to an existing plot |
save |
Whether to return matrix of polygons |
landcolor |
Color of polygons |
seacolor |
Color of ocean |
zoom |
Whether to start in interactive zoom mode |
A map is plotted with polygons clipped at borders of map region.
If the function is started in zoom mode two left-clicks on the map will zoom it to the rectangle spanned by the two points. This zooming is repeated until a right-click on the map is done.
Value is NULL
unless save
is TRUE
, in which case
a 2-column matrix is returned containing latitude and longitude
coordinates of the polygon vertices. Polygons are separated by
NAs in both columns.
Pierre Kleiber, and Anders Nielsen anders.nielsen@hawaii.edu
#This function requires GMT to be installed. If you have it try typing: # plotmap(8,13,53,58,res=1,zoom=TRUE)