使用GeoPandas繪圖時,我掙扎着爭論。對此,我有些不明白原因,我試圖用「facecolor」,「edgecolor」,「線寬」和應該傳遞其他的參數和關鍵字matplotlib(當得到這個錯誤GeoPandas繪圖問題
TypeError: plot_dataframe() got an unexpected keyword argument 'facecolor'
在我的理解中)。
這裏我的代碼示例
import geopandas as gpd
import matplotlib.pyplot as plt
my_shape=gpd.GeoDataFrame.from_file('myshape.shp')
f = plt.figure()
my_shape.plot(column='TYPE',colormap='cubehelix', alpha=0.5, categorical=True, legend=True, axes=f.gca(), edgecolor='w')
我可能會做一些錯誤,但是,即使當我試圖重現這個例子:
Change single patch color in geopandas
我無法得到它的權利和仍然得到類型錯誤
感謝您的幫助
Python 2.7.10 Anaconda 2.0.1(x86_64),Matplotlib 1.4.3,GeoPandas 0.1.1(pysal 1.10.0,descartes 1.0.1)
感謝Joris,我的錯誤是GeoDataFrame和Pandas DataFrame混淆在我對GeoPandas的理解中。再次感謝 – egayer