matplotlib / matplotlib/basemap

small bug in drawmapscale

Đang mở Phù hợp với người mới
#368 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ả

When using fancy style, the argument ax is not passed to self.plot while plotting the frame and ticks, ex:
#plot bottom line
rets.append(self.plot([x1,x4],[ybottom,ybottom],color=fontcolor)[0])

Thus, part of the map scale may be plotted in a different axes. Ex:

```
import pylab as pl
from mpl_toolkits.basemap import Basemap
m = Basemap(width=3000e3,height=3000e3,resolution='l',
projection='lcc',lat_1=50.,lat_0=47,lon_0=1.)

ax0=pl.axes()
ax1=pl.axes([.6,.5,.15,.15])
m.drawcoastlines(ax=ax0)
lon,lat=-15,47
lon0,lat0=lon,lat
scaleL=400
#pl.axes(ax0) #this will avoid the problem...
o=m.drawmapscale(ax=ax0,lon=lon,lat=lat,lon0=lon0,lat0=lat0,
length=scaleL,barstyle='fancy',fontcolor='r')
```

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Start at the Basemap.drawmapscale entry point and inspect the fancy-style frame and tick plotting calls shown in the issue. Reproduce the supplied example with two axes, then verify that every part of the map scale is plotted on the ax0 axes rather than the current axes.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
matplotlib, python
Lĩnh vực
data-visualization
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
68/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.