SciTools / cartopy

Cartopy - a cartographic python library with matplotlib support
https://scitools.org.uk/cartopy/docs/latest
BSD 3-Clause "New" or "Revised" License
1.43k stars 364 forks source link

Strange choice of extent on Stereographic Contour plots. #326

Open mikewalker92 opened 11 years ago

mikewalker92 commented 11 years ago
import iris
import cartopy
import matplotlib.pyplot as plt
import iris.quickplot as qplt
import cartopy.crs as ccrs

cube = iris.load_cube(iris.sample_data_path('A1B.2098.pp'))

plt.axes(projection=ccrs.Stereographic())

qplt.contour(cube)

plt.show()

oddextents

This has some similarities to issue #321, in that zooming or using the set global command will recover the expected plot, but in this case the plot is too far zoomed in rather than too far zoomed out. It therefore seemed like this may be a separate issue, especially as it is not intuitively related to data being plotted outside of the size of the projection which seemed a likely explanation for #321.

Issues with extent seemed to occur in all global data for stereographic contour plots, but it seems to sometimes zoom in to far and sometimes zoom out to far.

pelson commented 8 years ago

I suspect this is fixed with changes that have been made to matplotlib in the last 2-3 years. We can re-open if that is not the case.

pelson commented 8 years ago

Still an issue in v1.5 of mpl.

pelson commented 5 years ago

Checked, and still an issue in mpl 2.2.3. Need to dig some more to identify if it is an iris issue or a cartopy issue.