Graphics Reference
In-Depth Information
Figure 12-6. All the ColorBrewer palettes
The ColorBrewer palettes can be selected by name. For example, this will use the
Oranges
palette (
Figure 12-7
):
p
+
scale_fill_brewer(palette
=
"Oranges"
)
Figure 12-7. Using a named ColorBrewer palette
You can also use a palette of greys. This is useful for print when the output is in black and white.
The default is to start at 0.2 and end at 0.8, on a scale from 0 (black) to 1 (white), but you can
change the range, as shown in
Figure 12-8
.
p
+
scale_fill_grey()
# Reverse the direction and use a different range of greys
p
+
scale_fill_grey(start
=
0.7
, end
=
0
)