plotly / plotly/plotly.py

allow varying marker.line.width in 3DScatter plot

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

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

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

説明

Varying marker.line.width works nicely in go.Scatter, you're able to specify a different outline width for each point:

works

import plotly.graph_objs as go

x = [1,2,3]
y = [1,2,3]

fig = go.Figure(
          data=[go.Scatter(x=x, y=y,
            mode='markers',
            marker=dict(size=30,
              color=['rgba(100,0,0,.5)','rgba(0,100,0,.5)','rgba(0,0,100,.5)'],
              line=dict(color=['rgb(0,100,0)','rgb(0,0,100)','rgb(100,0,0)'], width=[3,6,9])
            ),
          )])

fig.show()

However in go.Scatter3d this functionally does not work:

import plotly.graph_objs as go

x = [1,2,3]
y = [1,2,3]
z = [1,2,3]

fig = go.Figure(
          data=[go.Scatter3d(x=x, y=y,z=z,
            mode='markers',
            marker=dict(size=30,
              color=['rgba(100,0,0,.5)','rgba(0,100,0,.5)','rgba(0,0,100,.5)'],
              line=dict(color=['rgb(0,100,0)','rgb(0,0,100)','rgb(100,0,0)'], width=[3,6,9])
            ),
          )])

fig.show()

ValueError: Invalid value of type 'builtins.list' received for the 'width' property of scatter3d.marker.line Received value: [3, 6, 9] The 'width' property is a number and may be specified as: - An int or float in the interval [0, inf]

This different functionality is actually reflected in the documentation, but additionally, passing a single value to data[type=scatter3d].marker.line.width does not actually change point outline widths; changing [3,6,9] in the above code to 20 or .5 results in the same graph.

It would be great if go.Scatter3d could behave the same as go.Scatter for this.

I'm using plotly 4.6.0 py_0 plotly
installed 05/05/20 using conda install -c plotly plotly

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

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

はじめの一歩

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

調査の方向性

Scatter3d marker.line.width の実装から始め、動作している Scatter の挙動と比較します。提供されている Python の例を実行して、リスト値の検証エラーと、効果のないスカラー値の両方を再現します。完了とは、点ごとの幅が受け入れられ、スカラー幅によって点のアウトラインが視覚的に変化することです。

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

評価

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

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

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