scale_color_ul {ggthemeUL}R Documentation

University of Ljubljana theme (color) scale

Description

Applies color scale to the given data based on the University of Ljubljana's visual identity guidelines.

Usage

scale_color_ul(
  palette = "primary",
  discrete = TRUE,
  reverse = FALSE,
  midpoint = NA,
  neutralColor = "white",
  guide = guide_colourbar(frame.colour = "#58595b", title.vjust = 0.8),
  ...
)

Arguments

palette

A character string indicating the color palette to use. Default is "primary". See ?ul_pal for other options.

discrete

A logical indicating whether the scale is discrete. Default is TRUE.

reverse

A logical indicating whether to reverse the order of colors in the palette. Default is FALSE.

midpoint

A numeric value indicating the midpoint for the color scale in case of a divergent color scale (default is NA).

neutralColor

A character string specifying the color to use for neutral values (default is "white").

guide

A guide function specification, such as guide_colorbar() or guide_legend(), used to modify specific guide properties (default is guide_colourbar(frame.colour = "#58595b", title.vjust = 0.8)).

...

Other arguments passed on to the scale functions (discrete_scale, scale_color_gradientn or scale_color_gradient2).

Details

This function returns a color scale to be used with ggplot2. It uses color palettes defined according to the visual identity of the University of Ljubljana.

Value

A discrete or gradient color scale.

See Also

scale_color_gradientn, scale_color_gradient2, discrete_scale

Examples

ggplot(mtcars, aes(x = mpg, y = wt, color = factor(gear))) +
geom_point(size = 4) +
scale_color_ul()

[Package ggthemeUL version 0.1.3 Index]