Skip to content

Commit ca47270

Browse files
authored
Fixes partial matching on guides (#5534)
I caught this testing ggnewscale. This is using the latest dev. ``` r library(ggplot2) options(warnPartialMatchDollar = TRUE) ggplot(mpg, aes(displ, hwy)) + geom_point(aes(colour = factor(year)), size = 5) #> Warning in grobs$label: partial match of 'label' to 'labels' #> Warning in grobs$label: partial match of 'label' to 'labels' ``` I think this is the correct change.
1 parent a9983a8 commit ca47270

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/guide-axis.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ GuideAxis <- ggproto(
377377
spacer <- max(unit(0, "pt"), unit(-1 * diff(range), "cm"))
378378

379379
# Text
380-
labels <- unit(measure(grobs$label), "cm")
380+
labels <- unit(measure(grobs$labels), "cm")
381381
title <- unit(measure(grobs$title), "cm")
382382

383383
sizes <- unit.c(length, spacer, labels, title)

0 commit comments

Comments
 (0)