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 )
aesthetics | The names of the aesthetics that this scale works with. |
---|---|
scale_name | The name of the scale that should be used for error messages associated with this scale. |
palette | 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., |
name | The name of the scale. Used as the axis or legend title. If
|
breaks | One of: |
labels | One of: |
limits | One of:
|
expand | 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 |
na.translate | 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 |
na.value | If |
drop | Should unused factor levels be omitted from the scale?
The default, |
guide | A function used to create a guide or its name. See
|
position | For position scales, The position of the axis.
|
super | The super class to use for the constructed scale |