Python Basemap: Error using shadedrelief, bluemarble or etopo (false longitude format?)

前端 未结 1 563
礼貌的吻别
礼貌的吻别 2021-01-25 16:42

I want to plot a map of the southern hemisphere centered on the pacific with some stuff drawn onto it with python matplotlib basemap.

Everything works fine unless I tr

相关标签:
1条回答
  • 2021-01-25 17:40

    It seems there was a bug in the basemap/init code. In fact, if you look at the latest version on github [see https://github.com/matplotlib/basemap/blob/master/lib/mpl_toolkits/basemap/init.py#L4139 and how it is different from line 4117 of your error] you will find out that the bug has been solved already. This means you can either do:

    # np.concatenate((self._bm_lons,self._bm_lons+360),1)
    np.concatenate((self._bm_lons,self._bm_lons+360))
    

    in the init.py code or get a newer version of basemap. Any of the two will solve your problem.

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