matplotlib Basemap plotting lat/long coordinates incorrectly

后端 未结 1 631
忘了有多久
忘了有多久 2021-01-21 06:04

I am trying to learn matplotlib and the mapping function Basemap, and am trying to plot a simple list of lat/long coordinates on a map. However, the Basemap coordinate conversio

相关标签:
1条回答
  • 2021-01-21 06:45

    From the basemap documentation

    Calling a Basemap class instance with the arguments lon, lat will convert lon/lat (in degrees) to x/y map projection coordinates (in meters). If optional keyword inverse is True (default is False), the inverse transformation from x/y to lon/lat is performed.

    Instead of x,y = m(lat, long) you hence need

    x,y = m(long, lat)
    
    0 讨论(0)
提交回复
热议问题