Only call figure.show if it exits.
[pypiezo.git] / pypiezo / base.py
index 55ec00b7b7aa4fbb2b222ca488c34053cba991be..3220e21833a060eca3eb76d2a03e0dd695ed6ba8 100644 (file)
@@ -900,7 +900,8 @@ class Piezo (object):
                 for i,name in enumerate(names):
                     axes.plot(d[:,i], label=name)
             figure.canvas.draw()
-            figure.show()
+            if hasattr(figure, 'show'):
+                figure.show()
             if not _matplotlib.is_interactive():
                 _matplotlib_pyplot.show()
         return input_data