Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Line thickness not accurate with ggplotly

Hi there!

I totally love the ggploty package that allows to make ggplot2 grafics interactive. However, my ggplotly grafics have a somehow thicker line stroke that does not look so good.

For example, compare the following two pictures:

1.) Original plot with ggplot2:

2.) Interactive plot based on (1) with ggplotly:

Questions:

1.) Why is this the case?

2.) Can I fix it?

Hey @CBSA,

you can manipulate trace attributes in the plotly object by using style(p, ... ). You can read about it and other ways to extend ggplotly() here https://cpsievert.github.io/plotly_book/extending-ggplotly.html

1 Like

Thanks! I will have a look.

I have the same issue and am struggling to find examples of this - could you paste your code?