Using colorbrewer scales
   get_help() docs


Description

All functions documented here are part of the {ggplot2} package, which is part of the {tidyverse}.

The {ggplot2} package provides several useful functions for specifying colorbrewer color/fill palettes for your color/fill aesthetic mapping scales. For more information on using this function to customize your theme, please either…

Briefly, there are four possible functions you might want to use depending on whether you are specifying a color or a fill, and type of variable being aesthetically mapped. To reverse the direction of any scale, include the optional argument direction = -1.

Aesthetic Mapped variable type ggplot2 function
Color Discrete/categorical
scale_color_brewer(palette = 'name of colorbrewer palette')
Color Continuous
scale_color_distiller(palette = 'name of colorbrewer palette')
Fill Discrete/categorical
scale_fill_brewer(palette = 'name of colorbrewer palette')
Fill Continuous
scale_fill_distiller(palette = 'name of colorbrewer palette')


The available colorbrewer palettes include the following: