matplotlib / matplotlib/basemap
Problem using Ortho projection and shadedrelief on a sector of the globe
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 817
- Fork
- 395
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách chạy ví dụ Basemap phép chiếu trực giao của issue, trước tiên không có ảnh nền, sau đó với m.shadedrelief(); so sánh phạm vi được kết xuất với các giới hạn llcrnrx, llcrnry, urcrnrx và urcrnry. Kiểm tra các entry point shadedrelief và bluemarble, đồng thời xác minh rằng nền được cắt theo vùng bản đồ được yêu cầu trong khi vẫn giữ nguyên hành vi phép chiếu hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- data-visualization
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100