iview | R Documentation |
Routines for visualisation of meteogrid objects. They use the meteogrid methods of image, contour, fcontour and vecplot.
iview(x,nlevels=15,color.palette=irainbow,
levels=pretty(x[1:gdomain$nx,1:gdomain$ny], nlevels),
col=color.palette(length(levels)-1),
title=paste(attr(x,"info")$name,"\n",attr(x,"time")),
legend=FALSE, mask=NULL, na.col=par("bg"),
drawmap=TRUE, maplwd=.5, mapcol='black', map.database='world',
interior=TRUE, fill=FALSE, ...)
cview(x,nlevels=15,
title=paste(attr(x,"info")$name,"\n",attr(x,"time")),
mask=NULL, add=FALSE,
drawmap=!add, maplwd=.5, mapcol="black", map.database="world",
interior=TRUE, fill=FALSE, ...)
fcview(x,nlevels=15,color.palette=irainbow,
levels=pretty(x[1:gdomain$nx,1:gdomain$ny], nlevels),
col=color.palette(length(levels)-1),
title=paste(attr(x,"info")$name,"\n",attr(x,"time")),
legend=TRUE,mask=NULL,
drawmap=TRUE, maplwd=.5, mapcol='black', map.database='world',
interior=TRUE, fill=FALSE, ...)
vview(U, V, add=FALSE, aspcorrect=TRUE,
drawmap=TRUE, maplwd=.5, mapcol="black", map.database='world',
interior=TRUE, fill=FALSE, ...)
x |
A |
U , V |
|
nlevels |
Number of (colour) levels. You may also give the levels explicitely. |
color.palette |
Colours for the levels. |
levels |
A fixed set of breaks. If |
col |
A fixed vector of colours. If provided, the length must be exactly equal to |
title |
Title for the plot. |
add |
If TRUE, the plot is superposed on the current image, |
mask |
Defines a mask such that all grid points with mask==FALSE are set to NA. The mask may be a matrix with the same dimension as x, an expression involving x, or even a string that is parsed and which uses 'x' to represent the data. |
na.col |
By default, masked grid points (and any other NA values) are transparent. With |
legend |
If TRUE, a color legend is drawn at the right of the image. |
drawmap |
If TRUE, a world map is superposed on the image. |
fill |
If TRUE, the map is drawn as filled polygons, not just lines. This is most interesting for contours and vectors, but may in rare cases be used with images, if the colours are transparent. |
interior |
If FALSE, the interior political borders are not drawn. |
maplwd , mapcol |
Line width and colour for the world map. |
map.database |
Which map data to use. Default is 'world' from the |
aspcorrect |
In Lat/Lon co-ordinates, the aspect ratio is not 1:1. If this argument is TRUE, a correction is attempted. For other projections, this argument is ignored. |
... |
Further options for |
These functions are in fact simple "wrappers" for the more general
functions limage
etc. The (...) indicates any
parameter that is accepted by these functions.
An image (iview
), contour (cview
) or filled contour
(fcview
) plot of the data, overlaid by geographical boundaries. vview
plots a vector field (e.g. wind).
limage
,vecplot
,contour
## Not run:
# mask as a string that is evaluated literally (x is the input data)
iview(x=field,mask="x>0") # all negative values are left blank
# mask as an expression, assuming lsm is a known geofield
iview(x=field,mask=lsm) # all points where lsm=FALSE are left blank
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.