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
I'm not yet sure where exactly this bug is coming from - I've only seen it triggered from using cartopy, and I'm not sure yet whether it's in our core/pylabtools or in matplotlib itself. It also only manifests itself in the notebook - the same exact code works just fine in terminal IPython...
In any case - on to the bug: the following code
# BUG: if auto_update is True, this code crashes in the notebookauto_update=True#auto_update = Falseimportmatplotlib.pyplotaspltimportcartopy.crsasccrsfig, ax=plt.subplots(subplot_kw=dict(projection=ccrs.PlateCarree()))
ax.coastlines()
ax.gridlines(draw_labels=True, auto_update=auto_update);
when auto_update is true, produces the traceback below (collapsed for brevity).
(pasting the traceback as an image as it's more readable)
When False, the code works as expected, producing this figure:
We may need to move this over to matplotlib, or even cartopy - just starting here before I lose track so at least we have it filed.
The text was updated successfully, but these errors were encountered:
Quick ping to @dopplershift in case you or others on cartopy have any thoughts - happy to work on a fix on our end if that's the case, but I'm wondering if it's something either in cartopy or mpl... (btw - loving cartopy, thx!!!)
My current guess is that it's an issue in cartopy? By no means sure, but it feels like there's something going on with how the gridlines are being initialized--weird that self.figure (for a Text instance is None) at that point.
Thanks for pitching in Ryan! It would be nice to get it fixed -I realized that with the label auto-update and the widget mpl backend, cartopy makes interactive map navigations absolutely trivial, while keeping all the map lat/lon info updated. It's really cool (obviously not super fast due to the roundtrips mandated by the architecture, but it does get the job done), but unfortunately this little bug does break that nice use case.
If you think there's anything on the IPtyhon mpl support that is causing this we're happy to look into it, but I'd be surprised...
@fperez I'm swamped at the moment, but if you could open this up as an issue over on the cartopy issue tracker it might get some traction from someone with some time. 😉
I'm not yet sure where exactly this bug is coming from - I've only seen it triggered from using cartopy, and I'm not sure yet whether it's in our
core/pylabtools
or in matplotlib itself. It also only manifests itself in the notebook - the same exact code works just fine in terminal IPython...In any case - on to the bug: the following code
when
auto_update
is true, produces the traceback below (collapsed for brevity).When False, the code works as expected, producing this figure:
We may need to move this over to matplotlib, or even cartopy - just starting here before I lose track so at least we have it filed.
The text was updated successfully, but these errors were encountered: