Open
Description
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)