I know that savefig has an option dpi. but if I make plots with plotly and write image I don't have an option to set dpi.
How can I set dpi with plotly?
TypeError: write_image() got an unexpected keyword argument 'dpi'
There is an option of passing scale argument to write_image method, which helps in increasing the resolution (by putting the value greater than 1) -- the same purpose intended by dpi.
So, the code would be like:
fig.write_image('figure.png', scale=2)
Here, the scale is put 2.
If the scale is less than 1, that would decrease the dimension instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With