Legend is not well displayed when locally saving the fig

the fig legend can be perfectly displayed in browser, but failed after locally saved.


with code below:


fig.update_layout(
title=fig_title,
title_font_size=13,
xaxis=dict(title=‘Week of The Year’),
yaxis=dict(title=unit),
font_size=10,
margin=dict(t=100),
legend=dict(title=dict(text=‘Calendar Year’)),
autosize=True
)

Hi,

have you seen this information?

https://plotly.com/python/static-image-export/#change-image-dimensions-and-scale

It seems that the size and scale of your output doesn’t match your original content

try setting the output resolution to an equivalent of you monitor resolution or adapt the scale as needed