mirror of
https://github.com/wassname/geopandas.git
synced 2026-09-23 13:20:36 +08:00
BUG: ensure that the colorbar gets plotted to the right axis (#523)
This commit is contained in:
committed by
Joris Van den Bossche
parent
597dfcf597
commit
4e8da4a08a
@@ -470,7 +470,7 @@ def plot_dataframe(df, column=None, cmap=None, color=None, ax=None,
|
||||
ax.legend(patches, categories, numpoints=1, loc='best')
|
||||
else:
|
||||
n_cmap.set_array([])
|
||||
ax.get_figure().colorbar(n_cmap)
|
||||
ax.get_figure().colorbar(n_cmap, ax=ax)
|
||||
|
||||
plt.draw()
|
||||
return ax
|
||||
|
||||
Reference in New Issue
Block a user