Only add colorbar if the cmap is not the default

This commit is contained in:
Steven Silvester
2015-07-16 21:39:05 -05:00
parent 9fb7676c92
commit 5632c9c1a9
+2 -1
View File
@@ -148,7 +148,8 @@ def imshow(im, *args, **kwargs):
kwargs.setdefault('vmin', lo)
kwargs.setdefault('vmax', hi)
ax_im = plt.imshow(im, *args, **kwargs)
plt.colorbar()
if cmap != _default_colormap:
plt.colorbar()
return ax_im
imread = plt.imread