8000 Handle recent changes to ggplot2's `plot_build()` logic by cpsievert · Pull Request #2262 · plotly/plotly.R · GitHub
[go: up one dir, main page]

Skip to content

Handle recent changes to ggplot2's plot_build() logic #2262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 5, 2023
Prev Previous commit
Next Next commit
Fix support for no guide
  • Loading branch information
cpsievert committed May 5, 2023
commit 3666c2ecc9fcf9f44f0abab4edb201170ffcaee8
3 changes: 2 additions & 1 deletion R/layers2traces.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ layers2traces <- function(data, prestats_data, layout, p) {
# now to the actual layer -> trace conversion
trace.list <- list()

aes_no_guide <- names(p$guides)[vapply(p$guides, identical, logical(1), "none")]
guides <- if (inherits(p$guides, "ggproto")) p$guides$guides else p$guides
aes_no_guide <- names(guides)[vapply(guides, identical, logical(1), "none")]

for (i in seq_along(datz)) {
d <- datz[[i]]
Expand Down
0