Skip to content

ggplotly breaks discrete x-axis with facet_yyyy in panels > 1 with only one category #1720

Description

@trekonom

ggplotly breaks a discrete axis with facet_yyyy when there is only one category present in a panel, except for the case that this happens to be the first panel. I stumbled over this bug based on a question on Stackoverflow:

library(plotly)

d <- data.frame(cat = c("A", "A", "A"), pan = paste("Panel", c(1, 2, 2)))
ggplot(d, aes(cat)) +
  geom_bar() +
  facet_wrap(~pan)

ggplotly()

facet-breaks-axis

Created on 2020-06-02 by the reprex package (v0.3.0)

Activity

  1. changed the title [-]ggplotly breaks discrete x-axis with facet_yyyy and scales "free_x" when there is only one category a panel[/-] [+]ggplotly breaks discrete x-axis with facet_yyyy in panels > 1 with only one category[/+] on Jun 2, 2020
  2. added a commit that references this issue on Jun 22, 2020
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