2015-05-02 58 views
1
31.238993 , 121.490515 
30.19777778 , 71.47416667 
25.617214 , 85.1446954 
5.316667 , -4.033333 

我希望在地图上简化绘制上述几点。底图中点的绘图不正确

代码中使用:

map = Basemap() 
map.drawcoastlines() 
map.drawcoastlines() 
map.drawcountries() 
map.fillcontinents(color='coral') 
x, y = map(lat_list[:5], long_list[:5]) 
map.scatter(x, y, marker='D',color='m') 
plt.show() 

它给了我这样的输出: enter image description here

这似乎不正确。点错了。它应该像 - http://www.darrinward.com/lat-long/?id=560996

我可能在指定不正确的参数时出错,但无法理解在哪里。从我从文档中读取的内容,map()应该将坐标映射到所用的地图系统。请帮助我确定错误。

回答

2

根据坐标和示例,也许您需要更改地图中的顺序。

x, y = map(long_list[:5], lat_list[:5]) 

因为地理纬度是Y坐标而经度是X坐标。