Discrete scale constructor
discrete_scale( aesthetics, scale_name, palette, name = waiver(), breaks = waiver(), labels = waiver(), limits = NULL, expand = waiver(), na.translate = TRUE, na.value = NA, drop = TRUE, guide = "legend", position = "left", super = ScaleDiscrete )
The names of the aesthetics that this scale works with.
The name of the scale that should be used for error messages associated with this scale.
A palette function that when called with a single integer
argument (the number of levels in the scale) returns the values that
they should take (e.g.,
The name of the scale. Used as the axis or legend title. If
A character vector that defines possible values of the scale and their order.
For position scales, a vector of range expansion constants used to add some
padding around the data to ensure that they are placed some distance
away from the axes. Use the convenience function
Unlike continuous scales, discrete scales can easily show
missing values, and do so by default. If you want to remove missing values
from a discrete scale, specify
Should unused factor levels be omitted from the scale?
A function used to create a guide or its name. See
For position scales, The position of the axis.
The super class to use for the constructed scale