sl.plot.fld.curvilin: Plot Curvilinear Field

sl.plot.fld.curvilinR Documentation

Plot Curvilinear Field

Description

Plot a 2-dimensional numerical or RGB(Alpha)-coded field on a curvilinear grid.

Usage

sl.plot.fld.curvilin(plot.init.res, vals = NULL, rgba = NULL, mask = NULL, lon.i, lat.i, border = TRUE, border.lwd = 0.01, colbar = sl.colbar.blackwhite_256, breaks = NA, breaks.log = FALSE, na.col = NULL)

Arguments

plot.init.res

a spheRlab plot specifics list as returned by sl.plot.init (or a variant thereof).

vals

an NlatxNlon matrix specifying a 2-dimensional numerical curvilinear field, or NULL (default), in which case rgba must be provided.

rgba

a list with the elements r, g, and b (and optionally a), each of which is an NlatxNlon matrix specifying a 2-dimensional RGB(Alpha)-coded curvilinear field, or NULL (default), in which case vals must be provided.

mask

an NlatxNlon matrix with logical values specifying which quadrangles to draw. Default is mask=NULL, equivalent to all matrix elements being TRUE meaning that all quadrangles (except NA values if na.col=NULL) are drawn.

lon.i

an Nlat+1xNlon+1 matrix specifying the interface longitudes corresponding to vals.

lat.i

an Nlat+1xNlon+1 matrix specifying the interface latitudes corresponding to vals.

border

a logical value indicating whether or not to draw lines for the polygon borders. Default is TRUE, which can avoid aliasing that may occur when plots are rendered. If aliasing still occurs, you can try to increase border.lwd.

border.lwd

the line width of the borders. Default is 1. Used only if border=TRUE. If this is used to avoid aliasing when plots are rendered, but aliasing still occurs, you can try to increase this value.

colbar

a spheRlab colourbar (as returned by sl.colbar) of length Nc to be used for the numerical field. Used only if vals is specified.

colbar.breaks

a numeric vector of length Nc-1 specifying the breaks between colours. Used only if vals is specified.

colbar.breaks.log

a logical value indicating whether colourbar breaks are to be placed logarithmically. Used only if vals is specified.

na.col

the color to be used for NA values. Default is na.col=NULL, meaning that no polygons are drawn where vals=NA.

Details

For each point of the curvilinear field, a quadrangle as defined by the interface longitudes and latitudes is drawn, with colouring according to the numerical value of the point and the colourbar provided.

Value

The colourbar will be returned for further usage (e.g., for plotting of the colourbar).

Author(s)

Helge Goessling

See Also

sl.plot.field, sl.colbar, sl.num2colbar, sl.lonlat2D.c2i

Examples

## To be provided ...

FESOM/spheRlab documentation built on April 6, 2024, 6:52 p.m.