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
In [1]: importmatplotlibIn [2]: matplotlib.use('gtkagg')
In [3]: importcartopy.crsasccrsIn [4]: importmatplotlib.pyplotaspltIn [5]: ax=plt.axes(projection=ccrs.Mercator())
In [6]: ax.coastlines()
In [7]: plt.show()
Here's sample output:
I have tried both the Mercator and Orthographic projections, the result is the same in both cases.
The text was updated successfully, but these errors were encountered:
That's explainable... Cartopy maps automatically change their extent based on the data added (just like regular matplotlib axes)... but coastlines don't count (otherwise every time you added coastlines the map would switch to being global.)
Try adding ax.set_global()
Now it might be explainable... but is it reasonable or desirable?
Thanks for pointing it out.
My next trick is to automatically do global if no data has been added to the plot. I think this is perfectly achievable and would make a lot more sense than the current behaviour!
Here's sample output:
I have tried both the Mercator and Orthographic projections, the result is the same in both cases.
The text was updated successfully, but these errors were encountered: