limits
are not used for the domain of manual scales with named values
#2666
Milestone
limits
are not used for the domain of manual scales with named values
#2666
Currently, the
limits
argument to manual scales is not used to define the domain of the scale when a namedvalues
vector is provided. Take the example from?scale_colour_manual
:Specifying
limits
will not change the domain of the scale---below,cyl == 6
values are still mapped to a colour and plotted---but will alter the legend (as thebreaks
used to draw the guide are assumed to be a subset oflimits
):With more exotic
limits
this can lead to very confusing legends:This could be fixed by ensuring that with named
values
, only elements with names within thelimits
are used in the scale mapping.Created on 2018-05-27 by the reprex package (v0.2.0).
PS. I'd be happy to contribute a PR if this is something that should be fixed.
The text was updated successfully, but these errors were encountered: