set the default color-map for discrete colors
setDefaultColorMapDistinct.RdSets default color mappings for discrete color and fill aesthetics in ggplot2. Each color map should be a vector of valid color values (hex codes, color names, etc.).
See also
Other setDefault functions:
Shapes,
colorMaps,
geomPointUnicode(),
getDefaultGeomAttributes(),
getDefaultOptions(),
getOspsuite.plots.option(),
resetDefaultColorMapDistinct(),
resetDefaultShapeDiscrete(),
resetDefaultTheme(),
resetDefaults(),
setDefaultShapeDiscrete(),
setDefaultTheme(),
setDefaults(),
setOspsuite.plots.option()
Examples
if (FALSE) { # \dontrun{
# Set custom color maps
customColors <- list(
c("#FF0000", "#00FF00", "#0000FF"), # RGB colors
c("red", "green", "blue") # Named colors
)
oldColors <- setDefaultColorMapDistinct(customColors)
# Use default OSP color maps
setDefaultColorMapDistinct()
# Reset to previous colors
resetDefaultColorMapDistinct(oldColors)
} # }