Skip to content

ggplotly() fails to preserve faceting #2103

Description

@AdrianAntico

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.

Activity

  1. AdrianAntico commented on Jan 31, 2022

    @AdrianAntico
    Author

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

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

  2. AdrianAntico commented on Jan 31, 2022

    @AdrianAntico
    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

  3. kwilson62 commented on Sep 6, 2024

    @kwilson62

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions