sl.plot.field.elem | R Documentation |
Plot a 2-dimensional numerical field on a triangular grid, where values are given at the nodes (vertices), by averaging the vertex triplets and filling the triangular elements.
sl.plot.field.elem(plot.init.res, num, lon, lat, elem, 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)
plot.init.res |
a spheRlab plot specifics list as returned by |
num |
a vector of length |
lon |
a vector of length |
lat |
a vector of length |
elem |
an |
fill |
a logical value indicating whether the elements (triangles) shall be filled. |
col.fill |
the fill colour. If |
border |
a logical value indicating whether or not to draw lines for the polygon borders. Default is |
col.border |
the colour of the borders. If |
colbar |
a spheRlab colourbar (as returned by |
colbar.breaks |
a numeric vector of length |
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 |
border.lty |
the line type of the borders (edges). |
na.col |
the color to be used for NA values. Default is |
The function uses sl.plot.field
internally.
If a colourbar is used, it will be returned for further usage (e.g., for plotting of the colourbar).
Unfortunately, R
does not seem to have the capability to draw genuine colour gradients (as Matlab and Python do). If that capability is added at some point (or found to already exist), it should be added as an option to this function.
Note that, instead of using this function with fill=FALSE
, one should use sl.plot.elem
where edges are drawn only once.
Helge Goessling
sl.plot.field
, sl.plot.elem
## To be provided ...
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.