plot.spatInt: Plot an interpolated map

Description Usage Arguments Author(s) See Also Examples

View source: R/plot.spatInt.R

Description

Plot method for spatInt objects.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## S3 method for class 'spatInt'
plot(
  x,
  basemap = TRUE,
  type = "Arctic",
  limits = "auto",
  limits.lon = 0.001,
  limits.lat = 0.001,
  col.scale.limits = NULL,
  legend.label = NA,
  round.lat = FALSE,
  n.lat.grid = 3,
  round.lon = FALSE,
  n.lon.grid = 3,
  keep.glaciers = TRUE,
  land.col = "grey60",
  land.size = 0.1,
  land.border.col = "black",
  gla.col = "grey95",
  gla.size = 0.1,
  gla.border.col = "black",
  grid.col = "grey70",
  grid.size = 0.1,
  base_size = 11,
  legend.position = "right",
  ...
)

Arguments

x

spatInt object from interpolate_spatial function.

basemap

Logical. Should basemap from basemap be used? Not implemented

type

Type of basemap. See basemap. Used only if basemap = TRUE.

limits

Map limits. See basemap. The option "auto" (default) limits the map using coordinate range in x. Replace by NULL to remove the automatic zooming. Alternatively use a numeric vector as described in basemap documentation.

limits.lon, limits.lat, round.lon, round.lat, n.lon.grid, n.lat.grid, land.size, land.col, gla.col, grid.col, land.border.col, gla.size, gla.border.col, grid.size, base_size, keep.glaciers, legend.position

See basemap documentation.

col.scale.limits

A numeric vector of lenght 2 defining the limits for color scale of interpolated results. If NULL (default), the limits will be generated automatically.

legend.label

Label for color legend. If NA (default), the labels are extracted from the spatInt object.

...

Additional arguments. Required by R build checks. Ignore.

Author(s)

Mikko Vihtakari

See Also

interpolate_spatial basemap

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(chlorophyll) ## load an example dataset
x <- interpolate_spatial(chlorophyll, Subset = "From <= 10", value = "Chla") ## Interpolate
plot(x) ## Plot, use plot(x, type = "Svalbard") for real

## Can be expanded by using ggplot2 syntax
plot(x) + ggplot2::geom_text(data = chlorophyll, 
ggplot2::aes(x = lon.utm, y = lat.utm, label = Station))

## Auto limits leave an empty space around the gridded surface.
## Changing limits is easiest using the inbuild argument
plot(x, limits = c(11.4,12.7,78.85,79.05))

MikkoVihtakari/WaterMass documentation built on Jan. 27, 2022, 11:50 p.m.