-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Rewrite guide_axis() and rename to draw_axis() #3349
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
Rewrite guide_axis() and rename to draw_axis() #3349
Conversation
I had to modify |
I'm Ok with the change in |
#' @param e2 An element object from which e1 inherits | ||
#' | ||
#' @noRd | ||
#' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to bring this function up to code, since you've touched. (In this case, that's just restyling) — https://style.tidyverse.org/functions.html#return
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
This is a PR to prepare for improvements in axis guides as part of #3322. This PR renames the internal function
guide_axis()
todraw_axis()
and includes a complete rewrite of (what is now)draw_axis()
.Renaming
guide_axis()
todraw_axis()
is necessary to make way for an exportedguide_axis()
function that returns a guide (instead of a grob). I used the term "draw" because it is used in many places in ggplot2 for functions that return grobs.The rewrite of
draw_axis()
is necessary because the current code is difficult to read and contains much duplication. This makes it difficult to change or improve, as is planned for #3322. The rewrite does not introduce any visual changes in the current tests, and I didn't add any new tests because I couldn't find any part of axis appearance that wasn't already tested between the guides and themes.