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
Is there an automatic way to keep the legend in graph with one line which was created with ggplot2 and then converted to plotly graph through ggplotly, subplot or similar function?
And why are this kind of labels labels removed?
Illustration of my concerns:
several_lines <- {ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, color = Species)) + geom_line()} %>%
ggplotly() %>%
layout(showlegend = TRUE) %>% plotly_build()
iris$All <- "All species"
one_line <- {ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, color = All)) + geom_line()} %>%
ggplotly() %>%
layout(showlegend = TRUE) %>% plotly_build()
Is there an automatic way to keep the legend in graph with one line which was created with
ggplot2
and then converted toplotly
graph throughggplotly
,subplot
or similar function?And why are this kind of labels labels removed?
Illustration of my concerns:
Legend is displayed:
Legend is missing:
Even the text of the legend entry is missing:
The text was updated successfully, but these errors were encountered: