Join GitHub today
Adding message for overwriting a coordinate system #2264
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
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