GeoPandas'ta bir Matplotlib colorbar oluşturmaya çalışıyorum.Geopandalarda Colorbar
AttributeError Traceback (most recent call last)
<ipython-input-55-5f33ecf73ac9> in <module>()
2 plt.figure(figsize=(15,15))
3 g_plot = g_df.plot(column = 'column_name', colormap='hot', alpha=0.08)
----> 4 plt.colorbar(g_plot)
...
AttributeError: 'AxesSubplot' object has no attribute 'autoscale_None'
Ben Colorbar işe nasıl emin değilim:
import geopandas as gp
import pandas as pd
import matplotlib.pyplot as plt
#Import csv data
df = df.from_csv('data.csv')
#Convert Pandas DataFrame to GeoPandas DataFrame
g_df = g.GeoDataFrame(df)
#Plot
plt.figure(figsize=(15,15))
g_plot = g_df.plot(column='column_name',colormap='hot',alpha=0.08)
plt.colorbar(g_plot)
aşağıdaki hatayı alıyorum.
GeoDataFrame, bir matplotlib 'Axes' nesnesini döndürür. "plt.colorbar", eşlenebilen bir nesne gerektirir ("Eksenler, eşlenebilen bir nesne değildir). – tom