New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding message for overwriting a coordinate system #2264

Closed
Ax3man opened this Issue Sep 13, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@Ax3man
Contributor

Ax3man commented Sep 13, 2017

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.

@Ax3man Ax3man changed the title from Adding message for multiple coordinate systems to Adding message for overwriting a coordinate system Sep 13, 2017

Ax3man added a commit to Ax3man/ggplot2 that referenced this issue Sep 14, 2017

Ax3man added a commit to Ax3man/ggplot2 that referenced this issue Sep 14, 2017

@hadley hadley closed this in 7d0549a Oct 31, 2017

@lock lock bot locked as resolved and limited conversation to collaborators Jun 18, 2018

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