bathymetry | R Documentation |
This function is used to display bathymetry (water depth) and isobath lines on a map. The data may be displayed in Digital Elevation Map (i.e. as an image) and/or contour lines which show the lines of water depth.
This function uses the image
function to display
Digital Elevation Map (DEM) and the contour
function
to derive the bathymetry lines from the DEM data. The DEM image changes
colours at each value defined by the ‘breaks’ argument, while contour
lines are drawn at each value in the ‘levels’ argument.
bathymetry(
dem = TRUE,
dem.col = c("lightblue", "deepskyblue4"),
breaks = c(-5000, -4000, -3000, -2000, seq(-1000, 0, by = 50)),
contour = TRUE,
contour.col = c("skyblue", "skyblue2"),
contour.lwd = c(0.4, 0.6),
contour.cex = c(0.4, 0.5),
levels = list(minor = seq(0, -200, by = -10), major = seq(0, -5000, by = -50)),
x = NULL,
y = NULL,
z = NULL,
...
)
dem |
Logical value stating whether or not the Digital Elevation Map (DEM) image is to be plotted. |
dem.col |
Vector of colours to be used in drawing the Digital Elevation Map. A colour scale is interpolated between the pair of specified colours, or if a single colour is specified, the interpolation is made between ‘white’ and the specified colour. |
breaks |
A numeric vector of values specifying at which bathymetric values the DEM map is to change colour, as given by the interpolated colour scale generated from ‘dem.col’. |
contour |
Logical value stating whether or not to draw bathymetry contour lines. |
contour.col |
Vector of colours to be used in drawing the bethymetry contour lines. A colour scale is interpolated between the pair of specified colours, or if a single colour is specified, the interpolation is made between ‘white’ and the specified colour. |
contour.lwd |
A vector of line width(s) to be used for bathymetry lines. Either one or two numeric values may be passed. |
contour.cex |
Contour label size(s) to be used for bathymetry lines. Either one or two numeric values may be passed. |
levels |
A numeric vector or a list of two numeric vectors specifying the levels at which contour lines are to be drawn. When a list is given, the first is used to plot minor lines and the second is used to draw major lines. |
x |
A numeric vector specifying the horizontal locations of the DEM
data specified by |
y |
A numeric vector specifying the vertical locations of the DEM data
specified by |
z |
A numeric vector, a numeric matrix or a
‘SpatialGridDataFrame’ object specifying the Digital Elevation Map
(DEM) values to be used by the |
... |
Further arguments to be passed to other functions. |
No value is returned.
# Draws the bathymetry for the current window:
map()
bathymetry()
coast()
box()
# Draw only red contour lines at every 10 meters:
map()
bathymetry(dem = FALSE, contour.col = "red", levels = seq(-500, 0, by = 10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.