## S3 method for class 'coastline':
plot(x,
xlab="", ylab="",
asp,
clatitude, clongitude, span,
expand=1,
mgp=getOption("oceMgp"),
mar=c(mgp[1]+1,mgp[1]+1,1,1),
bg,
fill='lightgray',
axes=TRUE,
add=FALSE,
debug=getOption("oceDebug"),
...)coastline object, as read by
read.coastline or created by
as.coastline, or a list containing items named
latitudplot.coastline
to set the aspect ratio to give natural latitude-longitude scaling
somewhere near the centre latitude on the plot. Often, it makes sense to
set asp yoursclongitude are provided, then any provided value of asp
is ignored, and instead the plot aspect ratio is computed based on the
center latitude. Alclatitude.span. A value for
span must bexpand is ignored if either par(mgp), and
also for par(mar), computed from this. The default is
tighter than the R default, in order to use more space for the
data and less for the axes.par("mar").read.coastline). Set to NULL to turn off
filTRUE to plot axes.TRUE to draw the coastline on an existing
plot. Note that this retains the aspect ratio of that existing plot, so
it is important to set that correctly, e.g. with asp=1/cos(lat * pi
/ 180), TRUE to get debugging information during
processing.yaxp=c(-90,90,4) for a plot extending from pole
to pole. To get an inset map inside another map, draw the first map, do
par(new=TRUE), and then call plot.coastline with a value
of mar that moves the inset plot to a desired location on the
existing plot, and with bg="white".
coastline-class explains the
structure of coastline objects, and also outlines the other functions
dealing with them.library(oce)
data(coastlineWorld)
plot(coastlineWorld)
plot(coastlineWorld, clatitude=44.6, clongitude=-63.6, span=1000)Run the code above in your browser using DataLab