with v6.3.0 the last y-axis label is cut off when top-margin is 0
未關閉
@camdecoster 已經在處理了。
開始於 2025年9月9日。
bug
P1
regression
- 主要語言
- Python
- 星號
- 18.8k
- 分支
- 2.8k
- 平均合併
- 16 小時 26 分鐘
- 30 天內合併 PR
- 21
描述
There seems to be a breaking change between 6.2.0 and 6.3.0. When setting the top-margin to 0 the y-axis label is cut off when it is right at the end of the axis.
You can reproduce this with this code.
import plotly.graph_objects as go
from datetime import datetime
x = [datetime(1912, 5, 6, 0, 0), datetime(2019, 5, 10, 0, 0)]
y = [7.6, 23.9]
fig = go.Figure()
fig.add_trace(go.Scatter(x=x, y=y, mode='markers'))
fig.add_trace(go.Scatter(x=[datetime(2025, 9, 1)], y=[5.9]))
fig.update_layout(
template='simple_white',
margin={'l': 10, 'r': 10, 't': 0, 'b': 10},
)
fig.write_image(file='t.jpeg')
The result differs between version. Since the tick itself is there, but the label is missing I feel this is a bug. Also margins should not control the plot itself and decide whether or not labels are drawn.
| plotly==6.2.0 | plotly==6.3.0 |
|---|---|
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
評估
這個 Issue 還沒有評估資料。