We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
guide_legend(reverse = TRUE)
I reversed the legend order with guide_legend(reverse = TRUE), but the legend is unchanged in the plotly plot. The ggplot version is reversed.
library(plotly, warn=FALSE) #> Loading required package: ggplot2 set.seed(123) df <- data.frame(x = rnorm(10), y = rnorm(10), group = rep(c("A", "B"), times = 5)) p1 <- ggplot(df, aes(x = x, y = y, color = group)) + geom_line() + guides(color = guide_legend()) # Legend order default # Plot with guides p2 <- ggplot(df, aes(x = x, y = y, color = group)) + geom_line() + guides(color = guide_legend(reverse = TRUE)) # Legend order reversed # Convert ggplot with reversed legend order ggplotly(p2) # Legend not reversed
Originally posted by @simonsteiger in #2234 (comment)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I reversed the legend order with
guide_legend(reverse = TRUE)
, but the legend is unchanged in the plotly plot. The ggplot version is reversed.Originally posted by @simonsteiger in #2234 (comment)
The text was updated successfully, but these errors were encountered: