`stream`: streamlines stuck in default colour scale
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 70/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- matplotlib, python
調査の方向性
まず cf-plot の stream 実装と、それが matplotlib の streamplot を呼び出す箇所を見つけてください。それを、cscale が plotvars にどのように保存され、cbar によってどのように使われるかと比較してください。提供された MRE で再現し、次に cfp.cscale("plasma") を設定すると、追加の stream kwargs なしでカラーバーと流線の色の両方が変わることを確認してください。完了とは、流線が有効なカラースケールを継承し、既存の例が引き続きレンダリングされることを意味します。
索引モデルが issue の本文から書いたものです。
説明
There is no way to customise the colour scale in which the streamlies are displayed in a stream function - the colour bar scale can be edited and displays in the specified colour scale, but the streamlines themselves don't match. I can't see any way from the stream keywords to set this, though really it should pick up on the config. for the set cscale value without having to be specified again separately, so that's a moot point.
MRE
This is basically Example 16c, with some minor config. removed, and the setting of the colour scale changed from the default to 'plasma' (anything other than the default 'viridis' will do!).
# u, v being compatible eastward and northward wind vector fields
magnitude = (u--2 + v--2) -- 0.5
mag = np.squeeze(magnitude.array) # ignore this inefficiency which I will update
# Can set a colour scale to change colour bar, but it
# doesn't change the streamlines colours to match
# colour scale, and no stream function kwargs expose
# a way to do this that doesn't involve manipulating the
# underlying matplotlib object
cfp.cscale("plasma", ncols=13)
cfp.gopen()
cfp.stream(u=u, v=v, density=2, color=mag)
cfp.cbar(
levs=cfp.plotvars.levels,
position=[0.12, 0.12, 0.8, 0.02],
title="Wind magnitude",
)
cfp.gclose()
- 主要言語
- Python
- スター
- 21
- フォーク
- 11
- 平均マージ
- 3時間 7分
- マージ済み PR(30日)
- 11
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NCAS-CMS/cf-plot のほかの issue
-
docs enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
dependencies infrastructure installation testing
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
docs enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
NCAS-CMS/cf-plot の issue をすべて見る
似ている issue
-
eegprep-lean: set channel types from the Zarr group's channel_type対応中かも @claude が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
blacklanternsecurity/bbot#3679 ·
メンテナーはふだん 2 日以内に返信
-
Link Checker ReportオープンBot Type: Bug Type: Documentation
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
speakeasy-api/speakeasy#2159 ·
メンテナーはふだん 1 日以内に返信