Learn R Programming

ggthemeUL (version 0.1.3)

scale_fill_ul: University of Ljubljana theme (fill) scale

Description

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

Usage

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

Value

A discrete or gradient fill scale.

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_fill_gradientn or scale_fill_gradient2).

Details

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

See Also

Examples

Run this code
ggplot(mtcars, aes(x = mpg, fill = factor(cyl))) +
geom_density(alpha = 0.7) +
scale_fill_ul(discrete = TRUE)

Run the code above in your browser using DataLab