Given some minimal input information, SOmap_auto will attempt to guess an appropriate extent and projection to use. For demonstration purposes, run the function without any inputs at all and it will use random location data.

SOmap_auto(
  x,
  y,
  centre_lon = NULL,
  centre_lat = NULL,
  target = "stere",
  dimXY = c(512, 512),
  bathy = TRUE,
  land = TRUE,
  land_col = "black",
  ice = TRUE,
  ice_col = "black",
  input_points = TRUE,
  input_lines = TRUE,
  graticule = TRUE,
  expand = 0.05,
  contours = FALSE,
  levels = c(-500, -1000, -2000),
  ppch = 19,
  pcol = 2,
  pcex = 1,
  bathyleg = FALSE,
  llty = 1,
  llwd = 1,
  lcol = 1,
  gratlon = NULL,
  gratlat = NULL,
  gratpos = "all",
  ...
)

Arguments

x

optional input data longitudes. x can also be a Raster or Spatial object, in which case the extent of x will be used for the map, but note that the contents of x will not be plotted automatically (use SOplot to do so)

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

target

optional projection family (default is stereographic), or full PROJ string (see Details)

dimXY

dimensions of background bathmetry (if used), a default is provided

bathy

logical: if TRUE, plot bathymetry. Alternatively, provide the bathymetry data to use as a Raster object

land

logical: if TRUE, plot coastline. Alternatively, provide the coastline data to use as a Spatial object

land_col

character: colour to use for plotting the coastline

ice

logical: if TRUE, plot ice features (ice shelves, glacier tongues, and similar)

ice_col

character: colour to use for ice features

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

expand

fraction to expand plot range (default is 0.05, set to zero for no buffer, may be negative)

contours

logical: add contours?

levels

numeric: contour levels to use if contours is TRUE

ppch

set point character (default=19)

pcol

set point color (default=19)

pcex

set point cex (default=1)

bathyleg

optional bathymetry legend (default=FALSE)

llty

set line type

llwd

set line width

lcol

set line color

gratlon

longitude values for graticule meridians

gratlat

latitude values for graticule parallels

gratpos

positions (sides) of graticule labels

...

reserved, checked for defunct and deprecated usage

Value

An object of class SOmap_auto, containing the data and other details required to generate the map. Printing or plotting the object will cause it to be plotted.

Details

To input your data, use input locations as x (longitude) and y (latitude) values. There must be at least two locations. The x input object can also be provided as a Raster or Spatial object, in which case the extent of x will be used for the map, but note that the contents of x will not be plotted automatically (use SOplot to do so).

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

Examples

if (FALSE) { # \dontrun{
  SOmap_auto(c(0, 50), c(-70, -50))
  SOmap_auto(runif(10, 130, 200), runif(10, -80, -10))
  SOplot(c(147, 180), c(-42, -60), pch = 19, cex = 2,col = "firebrick")
  SOmap_auto(runif(10, 130, 200), runif(10, -85, -60))

  ## save the result to explore later!
  protomap <- SOmap_auto(runif(10, 60, 160), runif(10, -73, -50))

  SOmap_auto(runif(50, 40, 180), runif(50, -73, -10), family = "laea", centre_lat = -15,
                input_lines = FALSE)
} # }