Maps data values to fill colours. Same semantics as scale_color() but for
the fill aesthetic (bars, boxes, polygons, etc.).
Usage
scale_fill(
plot,
name = ggplot2::waiver(),
trans = NULL,
limits = NULL,
range = NULL,
breaks = NULL,
labels = NULL,
...
)Arguments
- plot
A plotit object.
- name
Scale title (legend name).
ggplot2::waiver()= use variable name.- trans
Scale transformation.
NULLauto-detects, otherwise one of:"identity","discrete","reverse","binned". Unsupported values (e.g."log") produce a targeted error message.- limits
Data domain.
- range
Output range. Same as
scale_color(): colour vector, or"viridis","brewer","grey","hue".- breaks
Legend key positions.
- labels
Legend key labels.
- ...
Passed to the underlying ggplot2 scale function.
