Traces in facet plot drawn outside of figure area.
未關閉
還沒有人認領這個 Issue。
bug
P3
- 主要語言
- Python
- 星號
- 18.8k
- 分支
- 2.8k
- 平均合併
- 16 小時 26 分鐘
- 30 天內合併 PR
- 21
描述
Code to reproduce the issue:
import pandas as pd
import numpy as np
import plotly
import string
np.random.seed(0)
plotly.io.renderers.default = "browser"
COL_NAME = "Key"
FIGURE_HEIGHT = 12200
column_names = string.ascii_letters[0:20]
# FIGURE_HEIGHT = 7200 # This removes the issue
# column_names = string.ascii_letters[0:10] # This removes the issue
df = pd.DataFrame(np.random.randint(0,100,size=(100, len(column_names))), columns=list(column_names))
df.columns.name = COL_NAME
fig = plotly.express.line(df,facet_row=COL_NAME,height=FIGURE_HEIGHT)
fig.show()
Screenshot of what I'm seeing:

Issue may have to do with the height argument or the number of traces included in the figure, or some other aspect I don't suspect.
Thank you for the help and for the great visualization tool!
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從提供的重現開始:使用 plotly.express.line 和 facet_row,設定高度為 12,200 像素、20 欄,然後透過 fig.show() 檢查產生的圖形。將其與高度為 7,200 像素、10 欄且不會重現問題的情況進行比較;對於失敗的情況,當所有 traces 都保持在圖形區域內時即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- numpy, pandas, plotly, python
- 領域
- data-visualization
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 活躍
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100