Repository navigation
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.
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.