plotly / plotly/plotly.py

Allow setting the camera "field of view"

オープン
#4,005 コメント 1 件 リアクション 7 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

feature P3
主要言語
Python
スター
18.8k
フォーク
2.8k
平均マージ
16時間 26分
マージ済み PR(30日)
21

説明

It doesn't seem possible to set the 3D camera field of view (fov).

(Re: my post to Stackoverflow.)

Looking at the source code, I see that:

In https://github.com/plotly/plotly.js/blob/master/src/plots/gl3d/scene.js, it uses glPlot3d.createScene and sets the options in proto.prepareOptions.

In https://github.com/gl-vis/gl-plot3d/blob/master/scene.js#L179, the allowed options include the field-of-view parameter fovy (field-of-view in the vertical direction), which defaults to Math.PI/4 (45 degrees).

For 3D graphics, a 45-degree vertical field-of-view typically gives an exaggerated perspective. It corresponds to about a 28mm camera lens.

It would be nice for plotly.graph_objects.layout.scene.Camera to include a fovy parameter (in radians).

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

plotly.py の layout.scene.Camera の定義から始め、カメラオプションがどのように plotly.js に渡るかを追跡します。src/plots/gl3d/scene.js、特に proto.prepareOptions を読み、gl-plot3d の scene.js の 179 行目付近にあるオプションと比較します。Python のカメラ API が fovy をラジアン単位で受け付け、3D シーンに渡せるようになれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, python
領域
data-visualization
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。