sl.plot.field: Plot Unstructured Field on Polygons around Nodes

sl.plot.fieldR Documentation

Plot Unstructured Field on Polygons around Nodes

Description

Plot a 2-dimensional numerical field on a triangular grid, where values are given at the nodes (vertices), by using the original node values and filling corresponding polygons defined by the surrounding 'stamp boundaries'.

Usage

sl.plot.field(plot.init.res, num, lon.v, lat.v, fill = TRUE, col.fill = "colbar", border = TRUE, col.border = "colbar", colbar = sl.colbar.redgreyblue_256, colbar.breaks = NA, colbar.breaks.log = FALSE, border.lwd = 1, border.lty = 1, na.col = NA)

Arguments

plot.init.res

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

num

a vector of length N specifying a 2-dimensional numerical (unstructured) field, with values valid at the nodes.

lon.v

an NxM matrix with the boundary polygon longitudes for each node in rows.

lat.v

an NxM matrix with the boundary polygon latitudes for each node in rows.

fill

a logical value indicating whether the polygons shall be filled.

col.fill

the fill colour. If col.fill="colbar" (default), the colourbar and breaks defined in colbar and colbar.breaks are used.

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.

col.border

the colour of the borders. If col.border="colbar" (default), then borders are coloured according to the field (node/polygon) values. This generates minute graphical overlap that prevents aliasing by artefacts ("fractures") between polygons in the plot.

colbar

a spheRlab colourbar (as returned by sl.colbar) of length Nc to be used for the field.

colbar.breaks

a numeric vector of length Nc-1 specifying the breaks between colours.

colbar.breaks.log

a logical value indicating whether colourbar breaks are to be placed logarithmically.

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.

border.lty

the line type of the borders.

na.col

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

Value

If a colourbar is used, it will be returned for further usage (e.g., for plotting of the colourbar).

Author(s)

Helge Goessling

See Also

sl.plot.field.elem, sl.plot.elem, sl.colbar, sl.num2colbar

Examples

## To be provided ...

helgegoessling/spheRlab documentation built on April 8, 2024, 8:34 a.m.