unlabel_rgb does not work on a list as it says in the docs
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 18.8k
- フォーク
- 2.8k
- 平均マージ
- 16時間 26分
- マージ済み PR(30日)
- 21
説明
The docs say "This function takes either an ‘rgb(a, b, c)’ color or a list of such colors" but a list fails.
windows 10, plotly 4.14.3
from plotly.colors import *
colorset = sequential.YlOrRd
print([unlabel_rgb(c) for c in colorset])
print(unlabel_rgb(colorset))
[(255.0, 255.0, 204.0), (255.0, 237.0, 160.0), (254.0, 217.0, 118.0), (254.0, 178.0, 76.0), (253.0, 141.0, 60.0), (252.0, 78.0, 42.0), (227.0, 26.0, 28.0), (189.0, 0.0, 38.0), (128.0, 0.0, 38.0)]
ValueError Traceback (most recent call last)
in
2 colorset = sequential.YlOrRd
3 print([unlabel_rgb(c) for c in colorset])
----> 4 print(unlabel_rgb(colorset))
~\Anaconda3\Lib\site-packages_plotly_utils\colors_init_.py in unlabel_rgb(colors)
741 str_num = str_num + char
742 else:
--> 743 numbers.append(float(str_num))
744 str_num = ""
745 return (numbers[0], numbers[1], numbers[2])
ValueError: could not convert string to float: ''
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、報告された Plotly バージョンで、sequential.YlOrRd リストを使った文書化済みの unlabel_rgb の例を再現します。plotly.colors のインポートから unlabel_rgb を追跡し、1 色の場合とリストの場合の動作を比較します。完了とは、文書化されたリスト入力が報告された ValueError なしで動作し、既存の単一色の動作が維持されることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100