mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-08 18:24:56 +08:00
Only add colorbar if the cmap is not the default
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user