View source: R/plotting-framework-functions.R
matchLayerCols | R Documentation |
This is a helper function for when plotting Layers by colour. It takes a list of Layer ids (other things like "Total" or "Tree" can also be specified) and returns a list of colours with the names of the Layer (which is how ggplot likes colours to be specified).
matchLayerCols(
values,
layers,
others = list(Total = "black", None = "grey75", Tree = "brown", Grass = "green", Shrub
= "red")
)
values |
List of values (as chararacters) for which you want standard colours. |
layers |
A list of Layer objects (which should contain Layers with ids provided in 'values) |
others |
A list of other name-colour combinations, for example to plot 'Total' as black, "None" as grey, or whatever. Some defaults are defined. |
Returns a named list of colours, where the names are the values that the colours will represent
Matthew Forrest matthew.forrest@senckenberg.de
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.