Graphics Reference
In-Depth Information
Figure 10-6. Left: modified order with a grey palette; right: with a palette from RColorBrewer
All the previous examples were for
fill
. If you use scales for other aesthetics, such as
colour
(for lines and points) or
shape
(for points), you must use the appropriate scale. Commonly used
scales include:
▪
scale_fill_discrete()
▪
scale_fill_hue()
▪
scale_fill_manual()
▪
scale_fill_grey()
▪
scale_fill_brewer()
▪
scale_colour_discrete()
▪
scale_colour_hue()
▪
scale_colour_manual()
▪
scale_colour_grey()
▪
scale_colour_brewer()
▪
scale_shape_manual()
▪
scale_linetype()
By default, using
scale_fill_discrete()
is equivalent to using
scale_fill_hue()
; the
same is true for color scales.