You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
scale_name property should be removed from Scale objects #1312
One issue with simply removing this property is that the Scale objects will no longer have labels that indicate their subtype. For example, the brewer and grey scales are subtypes of color scales.
Is there a real issue or is it just a nicety? I cannot find anywhere in the code where this property is queried so there should be no problem in just removing it. On the other hand there doesn't seem to be an urgent need for the removal either as it is just a label...
Scale$scale_name should probably be set to the function that the user used to create the scale (e.g., "scale_x_continuous") so that it can generate the appropriate error message (I can't think of a better way to generate an informative error message given the other information available at transformation time). The current values of Scale$scale_name() only generate good error messages for x and y scales (which most commonly generate errors).
I do, however, feel that Scale$call should be removed, since it is never used.
Activity
thomasp85 commentedon Aug 3, 2016
Is there a real issue or is it just a nicety? I cannot find anywhere in the code where this property is queried so there should be no problem in just removing it. On the other hand there doesn't seem to be an urgent need for the removal either as it is just a label...
hadley commentedon Aug 23, 2016
Mostly just a nicety as part of continuing to clean up the API so it's easier to understand
hadley commentedon Sep 23, 2016
It should really become the
ggproto()class name, not a separate attribute.hadley commentedon Sep 23, 2016
But this doesn't seem super important, so lets not worry about for this release
hadley commentedon Oct 30, 2017
Needs a little thought as
ScaleContinous$transform()currently does:paleolimbot commentedon Jun 18, 2019
Scale$scale_nameshould probably be set to the function that the user used to create the scale (e.g.,"scale_x_continuous") so that it can generate the appropriate error message (I can't think of a better way to generate an informative error message given the other information available at transformation time). The current values ofScale$scale_name()only generate good error messages for x and y scales (which most commonly generate errors).I do, however, feel that
Scale$callshould be removed, since it is never used.