Skip to content

Commit 14a6b29

Browse files
authored
Fix partial matching: grob$label -> grob$labels (#5316)
1 parent 49d13ea commit 14a6b29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

R/guide-axis.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ GuideAxis <- ggproto(
324324

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

330330
sizes <- unit.c(length, spacer, labels, title)
@@ -355,8 +355,8 @@ GuideAxis <- ggproto(
355355

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

361361
# Initialise empty gtable
362362
gt <- exec(

0 commit comments

Comments
 (0)