multiplot | R Documentation |
Plot multiscale landscape objects
multiplot(
x,
colors = NULL,
breaks = NULL,
palette = "Terrain",
reverse.pal = F,
extra.arg = NULL,
...
)
x |
a list of multilayer raster objects |
colors |
a vector with hexadecimal or R-colors to be used for plot. If NULL the function will calculate a pallet based on the number of classes from the raster(s) |
breaks |
the conventional breaks from the plot function. These breaks match the values in the raster object and the vector of colors given by users or functions |
palette |
a hcl valid palette (to see all the options use hcl.pals). The defualt is "Terrain". Other popular are: "Heat","Heat 2","Terrain 2","Viridis","Plasma","Inferno" and 112 other paletts. |
reverse.pal |
a logical indicating whether to reverse the pallet |
extra.arg |
other valid parameter to pass to the rasterVis::levelplot function. See details. |
... |
arguments to be passed to further functions |
this function was designed to facilitate the plotting of objects returned by the functions decouple, decouple.specific, and nestedscales. Users can control specificities about different aspects of plotting categorical raster and creating copositions of such plots. This function was based on rasterVis::levelplot function and users might find more details in this function help.
rasterVis::levelplot
## Not run:
r <- landscapeDecoupler::r
p <- landscapeDecoupler::p
b <- c(1000,2000)
ls <- decouple(r, p, b)
multiplot(ls) #plot every element in the object
multiplot(ls[1]) #return the scale name
multiplot(ls[[1]]) #also plot, but with no names
multiplot(ls$p01) #same above, but different calling
multiplot(ls[1:2]) #a subset of the object
multiplot(ls[1:4], extra.arg=list( layout=c(1,4), scales=list(tick=F, mark=F) ) )
multiplot(ls$p01, palette = "viridis")
#more paletts with hcl.pals()
class.colors <- c("green", "red", "yellow", "#AAAAFF", rgb(0.1,0.5,0.9,1))
multiplot(ls$p01, colors=class.colors)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.