Skip to content
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

Use coord_trans() instead of scale_x/y_...() to update axes scales and limits #151

Closed
pchelle opened this issue Jul 22, 2021 · 0 comments
Closed
Assignees

Comments

@pchelle
Copy link
Collaborator

pchelle commented Jul 22, 2021

The ggplot2 function coord_trans() affects only axes and not the data unlike scale_x/y_...()
It should be used instead to prevent unwanted crashes and warning messages from scale_x/y_...().

@pchelle pchelle self-assigned this Jul 22, 2021
pchelle added a commit to pchelle/TLF-Library that referenced this issue Jul 26, 2021
- `coord_trans()` can't be used for the transformation because the method adding the watermark in background. Consequently, log and discrete transformations still use scale_x/y... 
- For the same reason, `coord_cartesian()` is used to set the axis limits
- suppressMessage is needed for the same reason as scale: multiple coord systems or scales lead to ggplot unwanted messages
@Yuri05 Yuri05 closed this as completed in 5109ecc Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant