plotstyle.add: Adds plot styles locally to plotstyle.csv

plotstyle.addR Documentation

Adds plot styles locally to plotstyle.csv

Description

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.

Usage

plotstyle.add(
  entity,
  legend,
  color,
  marker = NULL,
  linestyle = NULL,
  replace = FALSE
)

Arguments

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.

Author(s)

David Klein, Jan Philipp Dietrich

See Also

plotstyle

Examples

## 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)

pik-piam/mip documentation built on April 5, 2024, 12:31 p.m.