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

align by axis values #173

Open
tjebo opened this issue Jan 3, 2021 · 1 comment
Open

align by axis values #173

tjebo opened this issue Jan 3, 2021 · 1 comment

Comments

@tjebo
Copy link

tjebo commented Jan 3, 2021

This is a feature request - aligning by axis values. I came across a use case in two SO posts:

https://stackoverflow.com/q/57392541/7941188
https://stackoverflow.com/q/65550501/7941188

User Z.Lin also offered a modification of the underlining align_plots function.

Hope this is of interest for the developer. Happy new year!

@clauswilke
Copy link
Contributor

If somebody wants to prepare a PR I'm happy to consider this. A couple of thoughts:

  • It can't be the default behavior, as it will break on any number of inputs that are currently valid. To keep the code clean, it would probably be best to add an alternative alignment function that aligns by axis values. If there is code shared between the two alignment functions it may make sense to define additional helper functions.
  • This needs extensive unit tests to make sure it doesn't break if there are changes in how ggplot2 works. I'd like to see both vdiffr-based tests and regular tests that probe the grob structure.

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

2 participants