matplotlib / matplotlib/basemap
Contouring bug on lcc projection
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ả
This same issue is occurring for all data types. Quite often, though not always, one of any of the contoured data will spike sharply downward away from the rest of the contour (seen below in the yellow data). This happens quite often in the middle of the domain.
I doubt this is a problem with the data themselves or my analysis since this error makes the contour line cross other contour lines of the same data. If there were just an anomaly at the bottom of the domain, I would expect there to just be a gradient with the contouring toward it. This makes me think that the problem is all in the plotting.

Here's the plotting portion of my code.
`
#Plotting
fig = figure()
map = Basemap(llcrnrlon=-120.,llcrnrlat=20.,urcrnrlon=-50.,urcrnrlat=50.,\
rsphere=(6378137.00,6356752.3142),\
resolution='l',projection='lcc',\
lat_0=40.,lon_0=-98.,\
lat_1=30.,lat_2=60.)
#Draw geographical boundaries
map.drawcoastlines(color='red',linewidth=0.75)
map.drawstates(color='red',linewidth=0.75)
map.drawcountries(color='red',linewidth=0.75)
map.fillcontinents(color='black',lake_color='black')
map.drawmapboundary(fill_color='black')
#Create X-Y plane for contouring and filling on map
X,Y = map(asarray(longitude_grid), asarray(latitude_grid))
#1st Variable#
#------------#
levels = linspace(700., 1200., 126) #4 mb levels for SLP
cs = map.contour(X,Y,var,2,colors='c',linewidths=1.,levels=levels)
clabel(cs, fmt="%1.0f", fontsize=8, inline=1)
#2nd Variable#
#------------#
levels = linspace(0.,12000.,241) #50 m levels for thickness/height
cs = map.contour(X,Y,contr,2,colors='y',linewidths=0.75,levels=levels)
clabel(cs, fmt="%1.0f", fontsize=8, inline=1)
#Snow Contour#
#------------#
cs = map.contour(X,Y,snow,2,colors='w',linewidths=2.,levels=[0.,1.])
title('%s SLP [Blu] and 800-500 mb Height [Ylo] over Snow Line [Wht]' % times[i])
savefig('temp_plot%03d.jpg' % i)
`
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
Không có tệp hoặc bài kiểm thử nào trong repository được nêu tên. Hãy bắt đầu bằng cách tái hiện Basemap lcc projection và các lệnh gọi contour được trình bày trong báo cáo với cùng các đầu vào longitude_grid, latitude_grid, var, contr và snow; công việc được xem là hoàn tất khi xác định được lý do các đường đồng mức bị nhô đột ngột hoặc giao nhau ngoài dự kiến, đồng thời xác nhận rằng plotting behavior đã được sửa không còn hiển thị các artifact đó.
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100