Lecture 16
Cornell University
INFO 3312/5312 - Spring 2025
March 20, 2025
|
![]() |
Figure redrawn from Claus O. Wilke. Fundamentals of Data Visualization. O’Reilly, 2019.
|
![]() |
|
![]() |
Figure redrawn from Claus O. Wilke. Fundamentals of Data Visualization. O’Reilly, 2019.
|
![]() |
|
![]() |
|
![]() |
Figure redrawn from Claus O. Wilke. Fundamentals of Data Visualization. O’Reilly, 2019.
|
![]() |
|
![]() |
|
![]() |
|
![]() |
Figure redrawn from Claus O. Wilke. Fundamentals of Data Visualization. O’Reilly, 2019.
|
![]() |
|
![]() |
|
![]() |
|
![]() |
Source: Lisa Charlotte Muth
Source: Lisa Charlotte Muth
Source: Lisa Charlotte Muth
Scale function | Aesthetic | Data type | Palette type |
---|---|---|---|
scale_color_hue() |
color |
discrete | qualitative |
Scale function | Aesthetic | Data type | Palette type |
---|---|---|---|
scale_color_hue() |
color |
discrete | qualitative |
scale_fill_hue() |
fill |
discrete | qualitative |
Scale function | Aesthetic | Data type | Palette type |
---|---|---|---|
scale_color_hue() |
color |
discrete | qualitative |
scale_fill_hue() |
fill |
discrete | qualitative |
scale_color_gradient() |
color |
continuous | sequential |
Scale function | Aesthetic | Data type | Palette type |
---|---|---|---|
scale_color_hue() |
color |
discrete | qualitative |
scale_fill_hue() |
fill |
discrete | qualitative |
scale_color_gradient() |
color |
continuous | sequential |
scale_color_gradient2() |
color |
continuous | diverging |
Scale function | Aesthetic | Data type | Palette type |
---|---|---|---|
scale_color_hue() |
color |
discrete | qualitative |
scale_fill_hue() |
fill |
discrete | qualitative |
scale_color_gradient() |
color |
continuous | sequential |
scale_color_gradient2() |
color |
continuous | diverging |
scale_fill_viridis_c() |
color |
continuous | sequential |
scale_fill_viridis_d() |
fill |
discrete | sequential |
scale_color_brewer() |
color |
discrete | qualitative, diverging, sequential |
scale_fill_brewer() |
fill |
discrete | qualitative, diverging, sequential |
scale_color_distiller() |
color |
continuous | qualitative, diverging, sequential |
… and there are many many more
Scale name: scale_<aesthetic>_<datatype>_<colorscale>()
<aesthetic>
: name of the aesthetic (fill
, color
)<datatype>
: type of variable plotted (discrete
, continuous
, binned
)<colorscale>
: type of the color scale (qualitative
, sequential
, diverging
, divergingx
)Scale function | Aesthetic | Data type | Palette type |
---|---|---|---|
scale_color_discrete_qualitative() |
color |
discrete | qualitative |
scale_fill_continuous_sequential() |
fill |
continuous | sequential |
scale_colour_continuous_divergingx() |
colour |
continuous | diverging |
Name | Hex code | R, G, B (0-255) |
---|---|---|
orange | #E69F00 | 230, 159, 0 |
sky blue | #56B4E9 | 86, 180, 233 |
bluish green | #009E73 | 0, 158, 115 |
yellow | #F0E442 | 240, 228, 66 |
blue | #0072B2 | 0, 114, 178 |
vermilion | #D55E00 | 213, 94, 0 |
reddish purple | #CC79A7 | 204, 121, 167 |
black | #000000 | 0, 0, 0 |
ae-15
Instructions
ae-15
(repo name will be suffixed with your GitHub name).renv::restore()
to install the required packages, open the Quarto document in the repo, and follow along and complete the exercises.