我希望使用Basemap软件包将城市名称绘制在德国地图上。我已经指定了经度和纬度值:
Cname=Form_Cities["name"].values
Clat=Form_Cities["lat"].values
Clon=Form_Cities["lon"].values
此外,
map=Basemap(projection="lcc",resolution="l",width=1E6,height=1E6,lon_0=9.9167,lat_0=51.5167,fix_aspect=False)#Resturn just the empty "figure with no conotents on it
map.shadedrelief()
map.drawcountries(color="black",zorder=1,linewidth=1)
并且使用:
ax.annotate(s=Cname,xy=(Clon,Clat),xycoords="axes pixels")
我想绘制城市名称,但是它不能正常工作,而是返回异常:
值错误:对象过于复杂,无法生成所需的数组