Skip to content
New issue

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

ggplotly() fails to preserve faceting #2103

Open
AdrianAntico opened this issue Jan 31, 2022 · 4 comments
Open

ggplotly() fails to preserve faceting #2103

AdrianAntico opened this issue Jan 31, 2022 · 4 comments

Comments

@AdrianAntico
Copy link

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
Copy link
Author

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

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

@AdrianAntico
Copy link
Author

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

@Mayalaroz
Copy link

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.

@kwilson62
Copy link

Hi, I also have this problem, if I print the ggplot:
image
p <- p + facet_wrap( as.formula(paste("~", paste(facet_var_row, collapse = " + "))), strip.position = "right", scales = "free_y", labeller = labeller(.multi_line = FALSE))
The strip position works correctly, but in ggplotly when rendered in Shiny:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants