matplotlib / matplotlib/basemap

pcolormesh can't shiftdata when X,Y are 1 larger than data

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

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

主要言語
Python
スター
817
フォーク
395
PR マージ指標
30日以内にマージされた PR はありません

説明

The pcolormesh docs (as noted in this issue https://github.com/matplotlib/basemap/issues/107) explain that:

"Ideally the dimensions of x and y should be one greater than those of data; if the dimensions are the same, then the last row and column of data will be ignored."

However when I actually try and use Basemap pcolormesh with this shape array, the shiftdata method sometimes fails because the data is not the same shape:

```
import numpy as np
from mpl_toolkits.basemap import Basemap
x = np.arange(-179, 191, 10)
y = np.array([50, 51, 52])
data = np.ones((2, 36))
xv, yv = np.meshgrid(x, y)
map = Basemap()
map.pcolormesh(xv, yv, data, latlon=True)
```

results in this error (in 1.0.7):

IndexError: Inconsistant shape between the condition and the input (got (3, 37) and (2, 36))

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

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

調査の方向性

まず報告された例を実行し、issue に記載されたエントリーポイントである Basemap.pcolormesh から shiftdata までを追跡してください。座標の形状 (3, 37) とデータの形状 (2, 36) を比較してください。このドキュメント化された pcolormesh の形状で、報告された IndexError が発生しなくなれば完了です。

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

評価

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

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

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