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
Should the trans argument in scale_*_continuous etc be renamed to transform? #5558
I'm not sure about the details, but the NEWS says:
Transformation function have been renamed to transform_*-prefixed names instead of *_trans-suffixed names. This allows for a better tab-completion search of transformations.
Regarding tab-completion, I don't see any benefit in ggplot2's case.
The main reason for the scales change was indeed to streamline the naming conventions in the package to have the common name in front to make tab-completion easier. However, as we were already renaming things we decided to also use a more descriptive and inclusive naming.
Let's keep this open but it is unlikely to be included in the upcoming release
I like the consistency argument, and I think in a perfect world that would be ideal. However, spending some time with untangling the latest reverse depency checks, I am usure we should even rename the Scale$trans field to Scale$transform. Probably the deprecation of the old arguments should happen in a more gradual fashion than the RC branch brings now. However, it would be easy to code coord_transform() as an alias for coord_trans(), so I can get behind this.
Thanks. I have no intention to push coord_transform(). I too am not sure if the renaming is worth. If there's no strong reason, maybe we can just leave coord_trans() as it is.
Activity
teunbrand commentedon Dec 4, 2023
I'm not sure whether that kerfuffle associated with changing argument names is worth the small increase in consistency.
davidhodge931 commentedon Dec 4, 2023
There must have been a reason for using
scales::transform_*rather thanscales::trans_*.Presumably the same reason holds? Consistency makes things easier
teunbrand commentedon Dec 4, 2023
I'll ask @thomasp85 to weigh in on this decision
yutannihilation commentedon Dec 4, 2023
I'm not sure about the details, but the NEWS says:
Regarding tab-completion, I don't see any benefit in ggplot2's case.
thomasp85 commentedon Dec 4, 2023
The main reason for the scales change was indeed to streamline the naming conventions in the package to have the common name in front to make tab-completion easier. However, as we were already renaming things we decided to also use a more descriptive and inclusive naming.
Let's keep this open but it is unlikely to be included in the upcoming release
eliocamp commentedon Dec 5, 2023
I like the trans argument name 🏳️⚧️
yutannihilation commentedon Dec 24, 2023
Just curious, should
coord_trans()also be renamed for consistency?teunbrand commentedon Dec 25, 2023
I like the consistency argument, and I think in a perfect world that would be ideal. However, spending some time with untangling the latest reverse depency checks, I am usure we should even rename the
Scale$transfield toScale$transform. Probably the deprecation of the old arguments should happen in a more gradual fashion than the RC branch brings now. However, it would be easy to codecoord_transform()as an alias forcoord_trans(), so I can get behind this.yutannihilation commentedon Dec 25, 2023
Thanks. I have no intention to push
coord_transform(). I too am not sure if the renaming is worth. If there's no strong reason, maybe we can just leavecoord_trans()as it is.