spherical_contour: Function to plot contours on spherical grid

View source: R/spherical_contour.R

spherical_contourR Documentation

Function to plot contours on spherical grid

Description

Function to plot contours on spherical grid

Usage

spherical_contour(
  field,
  FUN = "mean",
  lonR = NULL,
  latR = NULL,
  nx = 100,
  ny = 100,
  breaks = NULL,
  zlim = NULL,
  nlevels = 5,
  xlab = NULL,
  ylab = NULL,
  main = NULL,
  add = FALSE,
  col = "grey70",
  drawlabels = TRUE,
  verbose = FALSE
)

Arguments

field

A field object or a matrix with longitude and latitude attributes which is the output of esd::map.field

lonR

Center longitude of viewing angle

latR

Center latitude of viewing angle

nx

Length of output grid along x-direction. Default: nx=100

ny

Length of output grid along y-direction. Default: ny=100

breaks

Contour levels. If the argument 'breaks' is not defined, breaks = pretty(zlim, n=nlevels)

zlim

Range of contours. If the arguments 'breaks' and 'zlim' are not defined, zlim = range(field, na.rm=TRUE)

nlevels

Number of contour levels. If the arguments 'breaks' and 'nlevels' are not defined, nlevels=5

xlab

x-axis label

ylab

y-axis label

main

main title

add

a boolean; If TRUE, add contour lines to an existing plot. If FALSE, create new plot with contour lines

verbose

a boolean; if TRUE print information about progress

lat

A numeric vector of latitudes


metno/esd documentation built on Feb. 25, 2025, 6:44 p.m.