Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
scottshambaugh committed Dec 29, 2023
1 parent 8b25420 commit 66602ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/mpl_stereo/AxesStereo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 5 additions & 1 deletion tests/test_AxesStereo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand All @@ -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


Expand Down

0 comments on commit 66602ba

Please sign in to comment.