plotly.py
plotly.py copied to clipboard
Legend not fully displayed in SVG
The longest text of the legend gets cut off when saved to SVG.
fig = go.Figure()
fig.add_trace(go.Scatter(
x=[1, 2, 3, 4, 5],
y=[1, 2, 3, 4, 5],
name="ShortTitle"
))
fig.add_trace(go.Scatter(
x=[1, 2, 3, 4, 5],
y=[5, 4, 3, 2, 1],
name="ALongerTitle"
))
fig.write_image("test.svg")
Saving to another format gives the full legend.