[1] "white" "aliceblue" "antiquewhite" "antiquewhite1"
[5] "antiquewhite2" "antiquewhite3" "antiquewhite4" "aquamarine"
[9] "aquamarine1" "aquamarine2" "aquamarine3" "aquamarine4"
Visualizing Innovation
Colors
October 30, 2023
You can assign colors by names
[1] "white" "aliceblue" "antiquewhite" "antiquewhite1"
[5] "antiquewhite2" "antiquewhite3" "antiquewhite4" "aquamarine"
[9] "aquamarine1" "aquamarine2" "aquamarine3" "aquamarine4"
Alternatively, you can use hex color codes
Sequential
Use to encode numerical information with order

Diverging
Use to encode numerical information with critical midpoint

Qualitative
Use to encode categorical information

You may check whether the color scale works for people who can distinguish fewer colours than others with {colorBlindness}.

The viridis color scale is discriminable under the most common forms of colour blindness, and reproduces well in greyscale.

scale_color_*
scale_fill_*
Continuous:
Discrete:

PI 0822 Economic Policy (Applied Track) | Winter term 2023