Skip to content

Adding message for overwriting a coordinate system #2264

@Ax3man

Description

@Ax3man

When one supplies multiple scales for the same aesthetic, a message is printed that notifies the user. When multiple coordinate systems are supplied, however, the last one is used without notification. This is sometimes confusion for new users, that e.g. expect coord_trans to work with other coord_ functions. Could a message be added?

This gives a nice message:

qplot(1:2, 1:2) + ylim(0, 2) + ylim(0, 3)
# Scale for 'y' is already present. Adding another scale for 'y', which will replace the existing scale.

But this doesn't:

qplot(1:2) + coord_trans(y = 'log10') + coord_polar()

Unfortunately, it's not obvious to me where a replacement could be detected, as there is no coord_list like there is scales_list. I could prepare a PR, but I'd need some pointers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    coord 🗺️featurea feature request or enhancementwipwork in progress

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions