-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clabels plotting outside of projection limb #6436
Comments
This should probably be reported against I suspect it is not an order issue, the code that decides where to put labels may not be checking if they would be visible. The code for this lives at https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/contour.py#L58 |
This might actually be fixed on basemap's master as of a few days ago. This should probably be reported against basemap. I suspect it is not an order issue, the code that decides where to put The code for this lives at — |
Thanks @WeatherGod, do you know what PR that was? If this was fixed, would the milestone be the next release instead of 2.1? |
It would have been matplotlib/basemap#290 Keep in mind that basemap is on its own release "schedule" (I use the term extremely loosely here) separate from matplotlib. The next release will be version 1.1.0 -- keeping in mind that the last release was 4 years ago. Development has picked up in the past 6 months, but I have been hard-pressed to find time to actually do a release. So, I'd suggest working off of master for the time being. |
If you find that the clabels are still outside the projection limbs (quite possible, since I wasn't considering them at the time), do open a new issue over at basemap's issue tracker. |
Thanks @WeatherGod I've opened an issue against |
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.
The text was updated successfully, but these errors were encountered: