matplotlib / matplotlib/basemap
Problem using Ortho projection and shadedrelief on a sector of the globe
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 817
- フォーク
- 395
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I'm trying to plot a sector of the world in basemap using an orthographic projection and I would like to have a shadedrelief background.
If I don't use shadedrelief everything works fine:
```
import numpy as np
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
m = Basemap(projection='ortho',lon_0 = 0, lat_0 = 40,
llcrnrx=-3000000, llcrnry=1000000, urcrnrx=3000000, urcrnry=7000000,
resolution = 'l')
m.drawcoastlines()
m.fillcontinents(color='coral',lake_color='aqua')
# draw parallels and meridians.
m.drawparallels(np.arange(-90.,120.,30.))
m.drawmeridians(np.arange(0.,420.,60.))
m.drawmapboundary(fill_color='aqua')
```
[![Orthographic projection without shadedrelief background][1]][1]
However, when I add the command `m.shadedrelief()` (after removing the `m.drawmapboundary` and the `m.fillcontinents` commands) I get the following graph:
[![Orthographic projection with shadedrelief background][2]][2]
Apparently the problem is that the background is not restricted to the bounding box I set in the basemap command. I tried also with other backgrounds (e.g. bluemarble) but I get the same problem.
p.s. This is a copy of a thread that I opened on [stackexchange](https://gis.stackexchange.com/questions/298680/setup-shadedrelief-background-in-basemap-using-a-cropped-orthographic-projection), sorry for the cross-posting!
[1]: https://i.stack.imgur.com/iON27.png
[2]: https://i.stack.imgur.com/oVMAI.png
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず issue の正射図法 Basemap 例を実行し、最初は画像なしで、次に m.shadedrelief() を使って実行します。レンダリングされた範囲を llcrnrx、llcrnry、urcrnrx、urcrnry の境界と比較します。shadedrelief と bluemarble のエントリーポイントを確認し、既存の投影動作を維持したまま、背景が要求された地図領域にクリップされることを検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100