View source: R/envinmrRasterPlot.R
envinmrRasterPlot | R Documentation |
this function updates existing spplot
objects so that
i) the axes are drawn at all four sites (as these usually represent
coordinates) and ii) the colorkey is plotted on top of the graph so
that the main = ... argument can be used to describe the colorkey.
envinmrRasterPlot(
spplot.obj,
rot = 90,
col,
key.cex = 1,
width = 1,
height = 0.75,
...
)
spplot.obj |
the |
rot |
Rotation angle of the y-axis tick labels. Defaults to 90 degrees. |
col |
Color vector. If not specified, color information will
automatically be extracted from |
key.cex |
size of the colorkey labels. |
width |
Key width. |
height |
Key height. |
... |
additional arguments passed to |
a single lattice plot object
Tim Appelhans
update.trellis
, spplot
library(RColorBrewer)
rst <- raster::raster(volcano)
p1 <- spplot(rst)
p1
p2 <- envinmrRasterPlot(p1, col.regions = envinmrPalette(100))
p2
## change the colors as you like
p3 <- envinmrRasterPlot(p2,
col.regions =
colorRampPalette(brewer.pal(9, "YlGnBu"))(100))
p3
Orcs::latticeCombineGrid(list(p2, p1, p3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.