`write_image` doesn't seem to respect `width/height`
Open
@ayjayt is already working on this.
Since Aug 11, 2025.
bug
P2
- Dominant language
- Python
- Stars
- 498
- Forks
- 62
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 2
Description
Thanks for working on this helpful package again. I guess very likely similar to #12, but it seems to appear for our case:
- kaleido: 1.0.0, plotly: 6.2.0
- macos 15.6 (ARM64)
- Python 3.10.18
import plotly.graph_objects as go
fig = go.Figure(go.Bar(x=["A", "B"], y=[1, 2]))
fig.update_layout(width=1200, height=300)
fig.write_image("out.svg")
Saved image (obviously not 1200:300):
And the following as suggested in #12 seems to fix:
plotly.io.defaults.default_width = None
plotly.io.defaults.default_height = None
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.