Skip to content

Commit

Permalink
drop use of ggplot2:::draw_axis
Browse files Browse the repository at this point in the history
  • Loading branch information
mjskay committed Feb 23, 2024
1 parent 1dfa576 commit 3ccfa50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Documentation:
Bug fixes:

* Ensure `Mode()` works on analytical constant distributions.
* Various fixes to ensure compatibility with {ggplot2} 3.5.0.

Minor changes:

Expand Down
12 changes: 8 additions & 4 deletions R/subguide.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,13 @@ subguide_axis = auto_partial(name = "subguide_axis", function(

axis_position = get_subguide_axis_position(label_side, position, orientation)
axis_is_topleft = axis_position %in% c("left", "top")
#TODO: can't use unexported function here
axis_grob = ggplot2:::draw_axis(
break_positions = break_positions, break_labels = break_labels, axis_position = axis_position, theme = theme
axis_grob = draw_subguide_axis(
break_positions = break_positions,
break_labels = break_labels,
aes = y,
opp = x,
axis_position = axis_position,
theme = theme
)
axis_width = grob_width(axis_grob)

Expand Down Expand Up @@ -280,7 +284,7 @@ get_subguide_axis_position = function(side, position, orientation) {
#' modified version of ggplot2:::draw_axis for use by subguide_axis
#' @importFrom rlang :=
#' @noRd
draw_axis = function(
draw_subguide_axis = function(
break_positions, break_labels, aes, opp, axis_position, theme,
check.overlap = FALSE, angle = NULL, n.dodge = 1
) {
Expand Down

0 comments on commit 3ccfa50

Please sign in to comment.