From 4e8da4a08a6e7e470aff2716a85571d5ed917aee Mon Sep 17 00:00:00 2001 From: Levi John Wolf Date: Sat, 16 Sep 2017 12:56:17 -0400 Subject: [PATCH] BUG: ensure that the colorbar gets plotted to the right axis (#523) --- geopandas/plotting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geopandas/plotting.py b/geopandas/plotting.py index 31b6284..14b7dd3 100644 --- a/geopandas/plotting.py +++ b/geopandas/plotting.py @@ -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