matplotlib / matplotlib/basemap
ortho projection w/ limits crashes
Đang mở
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ả
Basemap documentation states that ortho projection can take ll/ur crnr limits. The following code seems like it should work (mpl 1.4.0), but does not:
from mpl_toolkits.basemap import Basemap
m = Basemap(projection='ortho',lon_0=0,lat_0=0,llcrnrlat=-10,llcrnrlon=-10,urcrnrlat=10,urcrnrlon=10)
Error:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-98fbf042abb9> in <module>()
----> 1 m = Basemap(projection='ortho',lon_0=0,lat_0=0,llcrnrlat=-10,llcrnrlon=-10,urcrnrlat=10,urcrnrlon=10)
/Users/mankoff/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.pyc in __init__(self, llcrnrlon, llcrnrlat, urcrnrlon, urcrnrlat, llcrnrx, llcrnry, urcrnrx, urcrnry, width, height, projection, resolution, area_thresh, rsphere, ellps, lat_ts, lat_1, lat_2, lat_0, lon_0, lon_1, lon_2, o_lon_p, o_lat_p, k_0, no_rot, suppress_ticks, satellite_height, boundinglat, fix_aspect, anchor, celestial, round, epsg, ax)
1032 self.area_thresh = area_thresh
1033 # define map boundary polygon (in lat/lon coordinates)
-> 1034 blons, blats, self._boundarypolyll, self._boundarypolyxy = self._getmapboundary()
1035 self.boundarylats = blats
1036 self.boundarylons = blons
/Users/mankoff/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.pyc in _getmapboundary(self)
1464 # circular region.
1465 thetas = np.linspace(0.,2.*np.pi,2*nx*ny)[:-1]
-> 1466 rminor = self._height
1467 rmajor = self._width
1468 x = rmajor*np.cos(thetas) + rmajor
AttributeError: 'Basemap' object has no attribute '_height'
> /Users/mankoff/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.py(1466)_getmapboundary()
1465 thetas = np.linspace(0.,2.*np.pi,2*nx*ny)[:-1]
-> 1466 rminor = self._height
1467 rmajor = self._width
ipdb>
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
Tái hiện ví dụ về hàm khởi tạo Basemap được ghi trong tài liệu, với phép chiếu ortho và các giới hạn góc được cung cấp. Bắt đầu tại điểm vào _getmapboundary được hiển thị trong traceback, sau đó lần theo cách phép chiếu khởi tạo các kích thước của nó. Hoàn thành khi ví dụ chạy xong mà không có AttributeError được báo cáo.
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
- 35/100