You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Guides are no longer named after Coord::train_panel_guides() is executed. This occurs in Layout::setup_panel_guides() which constructs the guides if they are missing and names them via Coord::setup_panel_guides().
The issue appears to be the addition of a line of code within Coord::train_panel_guides() with the intersect() function (copied here). intersect strips the names of the input character vector.
The names of the guides help to link them with their associated scales, and the breaking of this link breaks code in an extension package. This change also undoes the preceding line, which sets the names.
aesthetics<- c("x", "y", "x.sec", "y.sec")
names(aesthetics) <-aesthetics# If the panel_params doesn't contain the scale, there's no guide for the aestheticaesthetics<- intersect(aesthetics, names(panel_params$guides))
Reprex
library(ggplot2)
gg<- ggplot()
data<- ggplot_build(gg)
# Excerpt from ggplot_gtable.ggplot_builtplot<-data$plotlayout<-data$layoutdata<-data$datalayout$setup_panel_guides(plot$guides, plot$layers, plot$mapping)
# Line showing change in outcome
names(layout$panel_params[[1]]$guides)
Expected output (and output prior to #3972 / commit 10eba36):
[1] "x""y""x.sec""y.sec"
Current output:
NULL
The text was updated successfully, but these errors were encountered:
Guides are no longer named after
Coord::train_panel_guides()
is executed. This occurs inLayout::setup_panel_guides()
which constructs the guides if they are missing and names them viaCoord::setup_panel_guides()
.The issue appears to be the addition of a line of code within
Coord::train_panel_guides()
with theintersect()
function (copied here).intersect
strips the names of the input character vector.The names of the guides help to link them with their associated scales, and the breaking of this link breaks code in an extension package. This change also undoes the preceding line, which sets the names.
Reprex
Expected output (and output prior to #3972 / commit 10eba36):
Current output:
NULL
The text was updated successfully, but these errors were encountered: