I can convert a plot created by ggplot2
easily via plotly::ggplotly()
as follows:
library(tidyverse)
ggplot(as_tibble(iris), aes(x=Sepal.Width, y=Petal.Length, color=Species)) + geom_point()
plotly::ggplotly()
I expected the following to work such that the points show up in each facets of the plotly figure.
ggplot(as_tibble(iris), aes(x=Sepal.Width, y=Petal.Length)) + facet_wrap(~Species)+ geom_point()
plotly::ggplotly()
This ggplot2
plot:
is converted to:
So it doesn't work, and simply returns a correctly faceted axes with no points.
Is there a workaround?
Versions:
R 3.6.1
RStudio 1.2.1335
tidyverse 1.2.1
ggplot2 3.2.1
tibble 2.0.1
plotly 4.9.0