Open davidhodge931 opened 3 years ago
ggplotly does not respect the labels argument in ggplot2:scale_fill_manual.
ggplotly
labels
ggplot2:scale_fill_manual
library(tidyverse) plot_data <- ggplot2::diamonds %>% mutate(cut = stringr::str_to_sentence(cut)) %>% group_by(cut, clarity) %>% summarise(average_price = mean(price)) %>% mutate(average_price = round(average_price / 1000, 1)) %>% ungroup() plot <- ggplot(data = plot_data, aes(average_price, cut, fill = clarity)) + geom_col() + coord_flip() + scale_fill_manual(values = viridis::viridis(8), labels = LETTERS[1:8]) plot plotly::ggplotly(plot)
https://github.com/ropensci/plotly/issues/1930
ggplotly
does not respect thelabels
argument inggplot2:scale_fill_manual
.