Description Usage Arguments Details Value
Create a raster from values and plot it to the current device
1 | map_from_variable(x, meta, subset, ..., beautify = TRUE)
|
x |
A vector of values to plot as a map, see details. |
meta |
The metadata list of a rSFSW2 simulation experiment. |
subset |
A vector logical vector to subset |
... |
Additional parameters most of which are passed to the plotting
function(s) |
beautify |
Add country borders and the equator to the plot. |
x
can be specified in two ways:
codes:
If x
is a numerical vector, then the values are interpreted
as z values and plotted by the function
image
which calls image
.
If x
is a vector of hexadecimal color codes, then the
values are plotted by the function rasterImage
,
similar to how plotRGB
plots multi-color raster
objects.
The following arguments in ...
are treated separately:
If ylim
is available but not asp
, then an aspect
ratio is calculated that corrects for longitude/latitude.
If useNA
is TRUE
and valNA
is available, then
NA
s are replaced by valNA
.
If trim
is TRUE
, then the resulting raster object
is trimmed using trim
.
If fextend
is a finite number, then the extent of the raster
object (after trimming) is expanded by that factor.
The raster object generated from x
by a call to
create_raster_from_variables
is returned invisibly.
The function is called for its side effect of plotting to the
current device.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.