Skip to content

Should the trans argument in scale_*_continuous etc be renamed to transform?  #5558

Closed

Description

@davidhodge931

Given that the scales functions will be changing from scales::*_trans to scales::transform_*

Activity

  1. teunbrand commented on Dec 4, 2023

    @teunbrand
    Collaborator

    I'm not sure whether that kerfuffle associated with changing argument names is worth the small increase in consistency.

  2. davidhodge931 commented on Dec 4, 2023

    @davidhodge931
    Author

    There must have been a reason for using scales::transform_* rather than scales::trans_*.

    Presumably the same reason holds? Consistency makes things easier

  3. teunbrand commented on Dec 4, 2023

    @teunbrand
    Collaborator

    I'll ask @thomasp85 to weigh in on this decision

  4. yutannihilation commented on Dec 4, 2023

    @yutannihilation
    Member

    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.

  5. thomasp85 commented on Dec 4, 2023

    @thomasp85
    Member

    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

  6. eliocamp commented on Dec 5, 2023

    @eliocamp
    Contributor

    I like the trans argument name 🏳️‍⚧️

  7. yutannihilation commented on Dec 24, 2023

    @yutannihilation
    Member

    Just curious, should coord_trans() also be renamed for consistency?

  8. teunbrand commented on Dec 25, 2023

    @teunbrand
    Collaborator

    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.

  9. yutannihilation commented on Dec 25, 2023

    @yutannihilation
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions