basemap
basemap copied to clipboard
clabels plotting outside of projection limb
- OS: Mac OS 10.11.4 (El Capitan)
- Matplotlib version: 1.5.1
- Basemap version: 1.0.7
- Both installed via anaconda
This issue was originally created in the matplotlib repo, but it was discussed there (matplotlib/matplotlib#6436) and decided that it should be against basemap.
The issue is that when I plot data over a basemap, and the region plotted is a subset of the globe, calling matplotlib.pyplot.clabel will place some clabels outside of the projection limb. I'm assuming it's because pyplot will create all the clabels first, and then plot the appropriate subset of data.
To illustrate this issue, here's a Jupyter notebook. The plot of the masked data represents the plot I would have expected pyplot to produce in the first place. If I choose to plot a small subset of data, clabels should be place on all visible contours, regardless of what region I plot.
Note that matplotlib/basemap#290 did not fix the issue. I can confirm that even with the basemap master compiled myself, clabels still have that issue.