plotly.R icon indicating copy to clipboard operation
plotly.R copied to clipboard

ggplotly() fails to preserve faceting

Open AdrianAntico opened this issue 3 years ago • 4 comments

If I create a ggplot with faceting, I can end up with several plots in a grid by the facet variables selected. When I convert that output to plotly via ggplotly(), the faceting is removed and the additional plots are blank.

AdrianAntico avatar Jan 31 '22 00:01 AdrianAntico

Also, this page should be showing the plot output with faceting but nothing is there

https://plotly.com/ggplot2/facet_grid/

AdrianAntico avatar Jan 31 '22 00:01 AdrianAntico

Also, the suggestion link on the top right part of the page doesn't work either

https://github.com/plotly/plotly.r-docs/edit/master/ggplot2/2016-11-29-facet-grid.Rmd

AdrianAntico avatar Jan 31 '22 00:01 AdrianAntico

Hello,

I also have a problem with faceting. From this example,

p <- ggplot(economics_long, aes(date, value)) + geom_line() + facet_wrap(vars(variable), scales = "free_y", nrow = 2, strip.position = "bottom") + theme(strip.background = element_blank(), strip.placement = "inside")

When I convert the object p into plotly (via ggplotly), the strip position is not taken into account. It stays in the top.

Mayalaroz avatar Apr 04 '22 10:04 Mayalaroz