You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression: imshow on geo axes produces an empty plot in matplotlib 2.0.0 #7903
In Matplotlib 1.5.3, it was possible to use imshow on geo axes (e.g. the mollweide projection defined in matplotlib.projections.geo. In Matplotlib 2.0.0, this produces a blank plot.
That seems like fundamentally incorrect behavior, doesn't it? Wouldn't most users expect that if anything, imshow with a projection would warp the image to that projection? It's never done that, though. In 2.0 its behavior with a log scale on one or both axes has changed so that it does map the image to the scale, but I think that its behavior with a non-affine projection has always been undefined. If so, it should raise an error. Alternatively, I suppose it could warn and drop back to the 1.5.x behavior. Comments, @mdboom?
Activity
efiring commentedon Jan 23, 2017
It appears that in 1.5.3 the image was being created in Cartesian coordinates and then clipped to the projection. Is this what you want?
lpsinger commentedon Jan 23, 2017
Yes.
efiring commentedon Jan 23, 2017
That seems like fundamentally incorrect behavior, doesn't it? Wouldn't most users expect that if anything, imshow with a projection would warp the image to that projection? It's never done that, though. In 2.0 its behavior with a log scale on one or both axes has changed so that it does map the image to the scale, but I think that its behavior with a non-affine projection has always been undefined. If so, it should raise an error. Alternatively, I suppose it could warn and drop back to the 1.5.x behavior. Comments, @mdboom?
lpsinger commentedon Jan 23, 2017
I was looking through past PRs... did this change occur in #5718?
WeatherGod commentedon Jan 23, 2017
lpsinger commentedon Jan 23, 2017
Oh, OK! I modified my test code to use
ax.imshow(..., extent=[0, 1, 0, 1], transform=ax.transAxes):And it works now:
Adapt bayestar_plot_allsky and friends to matplotlib 2.0.0
Adapt bayestar_plot_allsky and friends to matplotlib 2.0.0
lpsinger commentedon Jan 24, 2017
Was this just a latent bug in my own code that was revealed by the transition to 2.0.0? If so, then we can close this issue.