Skip to content

x axis problem when using facets with a unique value on the x axis #1577

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

Closed
paobranco opened this issue Jul 13, 2019 · 1 comment
Closed

Comments

@paobranco
Copy link

Hi,
Great package!

I found an issue when using facet_wrap and facet_grid.
The problem is related with the existence of a unique value in the x axis. When this happens, only the first panel shows the x axis correctly.
Here is a reproducible example:

data(iris)
ds <- iris[1:10,]
ds$var <- as.factor(c(rep("A", 5), rep("B",5)))
p <- ggplot(ds, aes(x=Species, y=Petal.Length))+facet_grid(~var)+geom_point()
p

This produces this plot:
Rplot1

However, when using ggplotly

ggplotly(p)

This happens:
Rplot2

The x axis of the first panel is OK, but all the other panels will show numbers on the x axis.

Thank you!

@cpsievert
Copy link
Collaborator

Fixed via #1788

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

No branches or pull requests

2 participants