## S3 method for class 'coastline':
plot(x,
xlab="", ylab="", showHemi=TRUE,
asp,
clongitude, clatitude, span,
lonlabel=NULL, latlabel=NULL, sides=NULL,
projection=NULL,
expand=1,
mgp=getOption("oceMgp"),
mar=c(mgp[1]+1,mgp[1]+1,1,1),
bg,
fill, # just so we catch it's use ... will be removed at some later time
border=NULL, col="lightgray",
axes=TRUE, cex.axis=par('cex.axis'),
add=FALSE, inset=FALSE,
geographical=0,
longitudelim, latitudelim,
debug=getOption("oceDebug"),
...)
coastline
object, as read by
read.coastline
or created by
as.coastline
, or a list containing items named
longitu
plot.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
and clatitude
are provided,
then any provided value of asp
is ignored, and instead the plot
aspect ratio is computed based onplot.coastline
. Using these arguments permits reasonably
simple customization. If themapPlot
).
If set to FALSE
then no projection is used, and the data are
plotted in a cartesion frame, with aspect ratio set to reduce distortion
expand
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")
.polygon
, which does the drawing).polygon
,
which does the drawing.) This is ignored unless the coastline
object is fillable.TRUE
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
for use within plotInset
. The
effect is to prevent the present function from adjusting margins, which
is necessary because margin adjustment is the basis for the methgeographical=0
, the axes are conventional, with decimal degrees as
the unit, and negative signs indicating the southern and western
hemispheres. If geographical=1
, the siglatitudelim
provide a second way to
suggest plot ranges. Note that these may not be supplied if
clongitude
, clatitude
and span
are given.longitudelim
.TRUE
to get debugging information during
processing.yaxp=c(-90,90,4)
for a plot extending from pole
to pole.plot.coastline
relied on
a now-defunct argument fill
to control colours; col
is to be
used now, instead. Also, in February, 2016, the arguments named
parameters
and orientation
were both removed, as they had become
nonfunctional about a year previously, in the transition to using
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)
par(mar=c(2, 2, 1, 1))
data(coastlineWorld)
plot(coastlineWorld)
plot(coastlineWorld, clongitude=-63.6, clatitude=44.6, span=1000)
## Canada in Lambert projection
plot(coastlineWorld, clongitude=-95, clatitude=65, span=5500,
grid=10, projection='+proj=laea +lon_0=-100 +lat_0=55')
Run the code above in your browser using DataLab