Cartopy: axis label - workaround

前端 未结 3 1091
误落风尘
误落风尘 2021-01-13 00:23

I am looking for a workaround to add x and y axis ticks and labels to a Cartopy map in Lambert projection.

The solution I have come up with is just an approximation

相关标签:
3条回答
  • 2021-01-13 00:59

    I haven't tried it out myself, but I noticed in the salem package docs there being an ability to handle gridlines of other projections with their homegrown plotting utility, which doesn't change matplotlib's axes' projection.

    0 讨论(0)
  • 2021-01-13 01:10

    My (quite crude) work-around to this is detailed in this notebook: http://nbviewer.ipython.org/gist/ajdawson/dd536f786741e987ae4e

    The notebook requires cartopy >= 0.12.

    All I've done is find the intersection of the appropriate gridline with the map boundary. I've assumed the map boundary will always be rectangular, and I can only label the bottom and left sides. Hopefully this might be useful as something to build on.

    0 讨论(0)
  • 2021-01-13 01:14

    Labeling grid lines is now supported on any cartopy projection as of cartopy v0.18.0. https://twitter.com/QuLogic/status/1257148289838911488

    0 讨论(0)
提交回复
热议问题