Description
There are several opportunities to improve the documentation for scale-related functions, including scale_(x|y)_continuous(), scale_(x|y)_discrete(), scale_*_gradient(), and scale_*_brewer(). This is a documentation issue intended for the tidyverse dev day (#3267).
-
In
scale_*_gradient()
, it may be worth mentioning that passingna.value = NA
is useful when used with thefill
aesthetic (fill = NA
results in no fill), but will not work for thecolour
aesthetic. -
In
scale_*_gradient()
, the behaviour ofmidpoint
when atrans
is applied should be documented (depends on resolution of midpoint is not transformed in scale_color_gradient2 #3198). -
The current documentation describes
scales::censor
, which may be worth linking to.scales::squish
andscales::squish_infinite
can be used here as well, which is not obvious from either the ggplot2 or scales documentation. -
The parameter documentation for
sec.axis
in scale_continuous should link tosec_axis()
(and possibly be removed from the "see also" section). -
The links to
scales::rescale()
aren't active on the site, and it isn't obvious thatrescale()
isn't a function in ggplot2 (from several scale-related documentation pages). -
It's worth mentioning that the "Palettes" section in
scale_*_brewer()
refers to thepalette
argument (and mention that there is a "Palettes" section in the argument documentation forpalette
). I know this seems obvious but I've answered this question a few times in tutorials. -
I'm not sure we need to demonstrate how to change scale label in the examples section for
scale_*_brewer()
, or the appearance of various scales on a dark background. -
In
scale_(x|y)continuous()
there is a link tolims()
andlabs()
, but inscale_(x|y)discrete()
there is not.
These are only suggestions, feel free to add to/debate!