Selects the colours depending on the current set theme.
scale_fill_discrete(..., type)
Additional parameters passed on to the scale type,
One of the following:
A character vector of color codes. The codes are used for a 'manual' color
scale as long as the number of codes exceeds the number of data levels
(if there are more levels than codes, scale_colour_hue()
/scale_fill_hue()
are used to construct the default scale). If this is a named vector, then the color values
will be matched to levels based on the names of the vectors. Data values that
don't match will be set as na.value
.
A list of character vectors of color codes. The minimum length vector that exceeds the number of data levels is chosen for the color scaling. This is useful if you want to change the color palette based on the number of levels.
A function that returns a discrete colour/fill scale (e.g., scale_fill_hue()
,
scale_fill_brewer()
, etc).
Other scales:
scale_colour_discrete()
,
scale_colour_gradient2()
,
scale_colour_gradient()
,
scale_colour_viridis_d()
,
scale_fill_gradient2()
,
scale_fill_gradient()