I’m trying to add dpi option in plotly charts.
How to set dpi option in plotly charts.
My code.
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(go.Bar(x=[“Apple”, ‘Mango’, ‘Banana’], y=[4000, 3000, 5000]))
fig.show()
I’m trying to add dpi option in plotly charts.
How to set dpi option in plotly charts.
My code.
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(go.Bar(x=[“Apple”, ‘Mango’, ‘Banana’], y=[4000, 3000, 5000]))
fig.show()
I’m not sure whether it answers your question, but you can set a number of pixels for the width and / or height of your figure when exporting to an image format (fig.to_image
).