plotstyle.add | R Documentation |
Adds plot styles locally to plotstyle object and returns a dataframe with all plotstyles including the added data. However, it does NOT change the "./inst/extdata/plotstyle.csv".
To add new entities to "./inst/extdata/plotstyle.csv" please open the file in your editor and add or change values by hand.
By default plotstyles of already existing entities will not be changed. Only new entities will be added. Use the replace
switch to replace existing styles.
If you want to keep the legend text or the color of an already existing entity and only replace one of the two values, use the string "keep" for the value you want to keep.
plotstyle.add(
entity,
legend,
color,
marker = NULL,
linestyle = NULL,
replace = FALSE
)
entity |
Vector of strings with names of entities (regions, variable names, etc.) |
legend |
Vector of strings with legend names of entities. |
color |
Vector of strings containing hexadecimal color codes. |
marker |
optional Vector of strings with marker codes. |
linestyle |
optional Vector of strings containing linestyle codes . |
replace |
Logical (default FALSE) indicating whether existing data should be replaced with new data. |
David Klein, Jan Philipp Dietrich
plotstyle
## Not run: plotstyle.add("AFR","Africa","#000000")
## Not run: plotstyle.add("AFR","keep","#FFFFFF")
## Not run: plotstyle.add("AFR","keep","keep",marker=20,replace=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.