Skip to content

Commit

Permalink
Fix partial matching: grob$label -> grob$labels (#5316)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimTaylor authored May 31, 2023
1 parent 49d13ea commit 14a6b29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/guide-axis.R
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ GuideAxis <- ggproto(

length <- elements$ticks_length
spacer <- max(unit(0, "pt"), -1 * length)
labels <- do.call(unit.c, lapply(grobs$label, measure))
labels <- do.call(unit.c, lapply(grobs$labels, measure))
title <- measure(grobs$title)

sizes <- unit.c(length, spacer, labels, title)
Expand Down Expand Up @@ -355,8 +355,8 @@ GuideAxis <- ggproto(

# Unlist the 'label' grobs
z <- if (params$position == "left") c(2, 1, 3) else 1:3
z <- rep(z, c(1, length(grobs$label), 1))
grobs <- c(list(grobs$ticks), grobs$label, list(grobs$title))
z <- rep(z, c(1, length(grobs$labels), 1))
grobs <- c(list(grobs$ticks), grobs$labels, list(grobs$title))

# Initialise empty gtable
gt <- exec(
Expand Down

0 comments on commit 14a6b29

Please sign in to comment.