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
{{ message }}
Repository navigation
lambdas in alt text have unexpected and likely incorrect behavior #6725
However, ggplot2::get_alt_text does work as expected.
>p<-ggplot2::ggplot(mtcars, ggplot2::aes(x=wt, y=mpg)) ++ggplot2::geom_point() ++ggplot2::labs(
+alt=~ sprintf(
+"Scatter plot showing %s on x-axis and %s on y-axis",
+.@labels$x,
+.@labels$y+ )
+ )
>ggplot2::get_alt_text(p)
[1] "Scatter plot showing wt on x-axis and mpg on y-axis"
Solution
I will open a small PR to fix this. I believe the solution is as simple as changing this lapply on line labels.R#L108 to match the call on labels.R#L336
Activity