【发布时间】:2018-01-21 11:43:38
【问题描述】:
我曾与其他用户一起查看过关于 Matplotlib 底图功能“绘制县”的先前问题,但它并没有解决我的问题。我仍然有底图:1.0.7-np113py35_0,带有最新的 python 版本(3.5.3-1)和 matplotlib 2.0.2 版本。这是我在美国境内的情节代码:
m = Basemap(projection='lcc',llcrnrlon=-88, llcrnrlat=28, urcrnrlon=-79,urcrnrlat=33,lat_0=31,lon_0=-83,width=5e6,height=3.5e6,resolution='i',area_thresh=1000)
m.drawcoastlines()
m.drawmapboundary()
m.drawcountries()
m.drawrivers(color='blue')
m.drawstates()
m.quiver(x,y,x1,y1,mag)
m.drawcounties()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 2: invalid continuation byte
我已经研究了使“drawcounties”中的 zorder 更大(~20)的问题,但这并没有解决问题。问题是每个新版本的 python、matplotlib 和底图都无法使用,还是不同的问题?任何帮助将不胜感激。
【问题讨论】:
-
您需要提供问题的minimal reproducible example,以及完整的错误回溯。在不调用 quiver works just fine 的情况下运行代码。
标签: python-3.x matplotlib matplotlib-basemap