diff --git a/fipy/viewers/matplotlibViewer/matplotlibViewer.py b/fipy/viewers/matplotlibViewer/matplotlibViewer.py index f9dd94a890..a01df6fa9d 100644 --- a/fipy/viewers/matplotlibViewer/matplotlibViewer.py +++ b/fipy/viewers/matplotlibViewer/matplotlibViewer.py @@ -192,7 +192,9 @@ def __init__(self, viewer, vmin=-1, vmax=1, orientation="vertical"): # standalone colorbar. There are many more kwargs, but the # following gives a basic continuous colorbar with ticks # and labels. - self._cb = matplotlib.colorbar.ColorbarBase(cbax, cmap=viewer.cmap, + import matplotlib.colors as colors + norm = colors.Normalize(vmin=vmin, vmax=vmax) + self._cb = matplotlib.colorbar.ColorbarBase(cbax, norm=norm, cmap=viewer.cmap, orientation=orientation) self._cb.set_label(viewer.vars[0].name)