Skip to content

No dashed or dotted grid lines with ggplotly #1536

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

Open
bjoernbos opened this issue May 22, 2019 · 2 comments
Open

No dashed or dotted grid lines with ggplotly #1536

bjoernbos opened this issue May 22, 2019 · 2 comments

Comments

@bjoernbos
Copy link

It seems that ggplotly cannot handle dashed or dotted grid lines. They always default to solid grid lines.

No matter whether I am specifying the general option panel.grid or a specific one like panel.grid.major.y, they always become solid with ggplotly.

library(ggplot2)
library(plotly)

# Dotted and dashed grid lines appear with ggplot2
p <- ggplot(mtcars, aes(disp, mpg)) +
  geom_point() +
  theme(panel.grid = element_line(colour = "red",
                                  linetype = "dotted")) # same issue if "dashed"

p

# However, with ggplotly they become solid
ggplotly(p)
@yiqinfu
Copy link

yiqinfu commented Jun 16, 2019

I'm having the same issue. The color argument works but not linetype argument.

@cpsievert
Copy link
Collaborator

cpsievert commented Jul 12, 2019

plotly.js currently doesn't allow for this amount of control, but I just requested it plotly/plotly.js#4045

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

3 participants