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 will move x-axis back to default position #148

Closed
meldarionqeusse opened this issue Feb 27, 2024 · 1 comment
Closed

Ggplotly will move x-axis back to default position #148

meldarionqeusse opened this issue Feb 27, 2024 · 1 comment

Comments

@meldarionqeusse
Copy link

install.packages("ggh4x")
install.packages("plotly")
library(ggh4x)
library(plotly)

df <- data.frame(x = c(0, 1), y=c(-0.2,0.2))

g <- ggplot(df, aes(x, y)) +
  geom_point() +
  theme(axis.line = element_line()) +
  coord_axes_inside(labels_inside = TRUE)
g  #shows xaxis correctly 
ggplotly(g) #displays x axis in default positions

Output of g

image

Output of ggplotly(g)

image

@teunbrand
Copy link
Owner

teunbrand commented Feb 27, 2024

Thanks for the report! I empathise with the problem, but there is very little I can do to change this.
For a sizeable part, ggplotly reimplements the build method of ggplots.
As far as I'm aware, there isn't a way in which extensions can interfere with that custom build method.
So in the current situation, I cannot fix this.

@teunbrand teunbrand closed this as not planned Won't fix, can't repro, duplicate, stale Feb 27, 2024
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

2 participants