BUG: ensure that the colorbar gets plotted to the right axis (#523)

This commit is contained in:
Levi John Wolf
2017-09-16 18:56:17 +02:00
committed by Joris Van den Bossche
parent 597dfcf597
commit 4e8da4a08a
+1 -1
View File
@@ -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