SOauto_map: Default Southern Ocean map

Description Usage Arguments Details Value Examples

View source: R/SOauto_map.R

Description

Provide minimal input information to get a default map. The simplest case is to run the function without any inputs at all and it will provide a random default.

Usage

1
2
3
4
5
6
SOauto_map(x, y, centre_lon = NULL, centre_lat = NULL,
  family = "stere", expand = TRUE, dimXY = c(300, 300),
  bathy = TRUE, coast = TRUE, input_points = TRUE,
  input_lines = TRUE, graticule = TRUE, buffer = 0.05,
  contours = TRUE, levels = c(-500, -1000, -2000),
  trim_background = TRUE, mask = FALSE)

Arguments

x

optional input data longitudes

y

optional input data latitudes

centre_lon

optional centre longitude (of the map projection, also used to for plot range if 'expand = TRUE')

centre_lat

as per 'centre_lon'

family

optional projection family (default is 'stere'ographic)

expand

re-compute range of plot to incorporate centre_lon and centre_lat with the data as a natural middle

dimXY

dimensions of background bathmetry (if used) default is 300x300

bathy

optional bathymetry data to use (or 'FALSE' for no bathmetry image)

coast

optional coastline data to use (or 'FALSE' for no coastline)

input_points

add points to plot (of x, y)

input_lines

add lines to plot (of x, y)

graticule

flag to add a basic graticule

buffer

fraction to expand plot range from that calculated (either from data, or from centre_lon/centre_lat _and_ data if 'expand = TRUE')

contours

add contours

levels

contour levels if 'contours = TRUE'

trim_background

crop the resulting bathymetry to its margin of valid values

mask

logical, 'FALSE' by default used to mask the raster and coastline to the graticule

Details

To input your data, use input locations as 'x' (longitude) and 'y' (latitude) values, there must be at least two locations.

Try families such as 'lcc', 'laea', 'gnom', 'merc', 'aea' if feeling adventurous.

Using ‘mask = TRUE' does not work well when the pole is included, so it’s 'FALSE' by default.

Value

the derived target extent and the map projection used, bathymetry, and coastline data

Examples

1
2
3
4
5
6
7
8
SOauto_map(c(0, 50), c(-70, -50))
SOauto_map(runif(10, 130, 200), runif(10, -80, -10))
SOauto_map(runif(10, 130, 200), runif(10, -85, -60))
## save the result to explore later!
protomap <- SOauto_map(runif(10, 60, 160), runif(10, -73, -50))

SOauto_map(runif(50, 40, 180), runif(50, -73, -10), family = "aea", centre_lat = -15,
              input_lines = FALSE)

Maschette/SOmap documentation built on May 26, 2019, 3:30 a.m.