matplotlib / matplotlib/basemap

pcolormesh not plotting onto 'ortho' basemap

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

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

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

説明

Hi There,

So I'm really new at this and quite out of my depth.

I was wondering if you could tell me why the following code is just giving me a blank sphere and not one with my pcolormesh information on:


from mpl_toolkits.basemap import Basemap
from netCDF4 import Dataset
import matplotlib.pyplot as plt
import numpy as np

convrain_set = Dataset('proxconvrain30.nc')
lats = convrain_set.variables['latitude'][:]
lons = convrain_set.variables['longitude'][:]
convrain = convrain_set.variables['cvrain'][:]
convrain = np.squeeze(convrain)
convrain_mean = np.mean(convrain,0)

map = Basemap(projection='ortho',lat_0=45,lon_0=-100,resolution='l')

map.drawmeridians(np.arange(0,360,30))
map.drawparallels(np.arange(-90,90,30))

lon,lat = np.meshgrid(lons,lats)

map.pcolormesh(lon,lat,convrain_mean)

plt.show()


I imagine I've just missed something simple and a little silly...

(Sorry if I've pub this question in the wrong place... I figured the people here were the best placed to help...)

All the best,

Neil

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

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

はじめの一歩

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

調査の方向性

まず、Basemap、netCDF4、NumPy、Matplotlib を使って issue 内のスクリプトを再現し、次に、提供された longitude、latitude、convrain_mean 配列と ortho 投影を使った Basemap の pcolormesh 呼び出しを調べます。描画結果を経線および緯線と比較します。降水量データが空白の球体だけでなく、地球儀上に表示されれば完了です。

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

評価

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

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

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