diff --git a/src/mpl_stereo/AxesStereo.py b/src/mpl_stereo/AxesStereo.py index b9987ec..9cfddba 100644 --- a/src/mpl_stereo/AxesStereo.py +++ b/src/mpl_stereo/AxesStereo.py @@ -366,7 +366,9 @@ def set_zlim(self, redraw : bool Whether to redraw the plot. If None, then will redraw. """ - if redraw is None and (self.zlim != zlim or self.zscale != zscale): + if (redraw is None + and (self.zlim != zlim + or (self.zscale != zscale and zscale is not None))): redraw = True self.zlim = zlim if zscale is not None: diff --git a/tests/test_AxesStereo.py b/tests/test_AxesStereo.py index b4fc028..7ea98ad 100644 --- a/tests/test_AxesStereo.py +++ b/tests/test_AxesStereo.py @@ -4,7 +4,7 @@ from mpl_toolkits.mplot3d.axes3d import get_test_data from mpl_stereo import AxesStereo2D, AxesStereo3D, AxesAnaglyph -from mpl_stereo.example_data import trefoil, sun_left_right +from mpl_stereo.example_data import trefoil, sun_left_right, church_left_right def _testdata(): @@ -20,6 +20,10 @@ def _testdata(): # Sun data sun_left_data, sun_right_data = sun_left_right() data['sun'] = (sun_left_data, sun_right_data) + + # Church data + church_left_data, church_right_data = church_left_right() + data['church'] = (church_left_data, church_right_data) return data