plotly / plotly/plotly.py

lightposition in Surface plots does not function correctly

未關閉
#2,176 2 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

bug P3
主要語言
Python
星號
18.8k
分支
2.8k
平均合併
16 小時 26 分鐘
30 天內合併 PR
21

描述

When setting the position of the light source in a 3d surface plot using

go.Surface(z=myz,x=myx,y=myy,lightposition=dict(x=1e5, y=0, z=0.),

the x,y,z components of the light source position do not appear to make any sense. They do not work as sensible vector, and will flip the light position with minor changes of x,y or z. Currently it seems you have to spend ages trying different random combinations of values until something vaguely works. This is very unsatisfactory. The documentation is not at all helpful as it implies the light position is a sensible vector, which it doesn't appear to be:

lightposition
Parent: data[type=surface]
Type: dict containing one or more of the keys listed below.
x
Parent: data[type=surface].lightposition
Type: number between or equal to -100000 and 100000
Default: 10
Numeric vector, representing the X coordinate for each vertex.
y
Parent: data[type=surface].lightposition
Type: number between or equal to -100000 and 100000
Default: 10000
Numeric vector, representing the Y coordinate for each vertex.
z
Parent: data[type=surface].lightposition
Type: number between or equal to -100000 and 100000
Default: 0
Numeric vector, representing the Z coordinate for each vertex.

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先,使用報告中顯示的 go.Surface 以及 lightposition 的 x、y 和 z 值重現此問題。追蹤這些座標如何被解讀為 3D 曲面圖的座標,然後根據文件記載的座標範圍驗證其行為,並讓光源位置能夠對這些值做出可預測的回應。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
data-visualization
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。