projects
/
pyafm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ffbbd19
)
AFM.stepper_approach should only call figure.show if it exits.
author
W. Trevor King
<wking@tremily.us>
Thu, 2 Aug 2012 16:17:21 +0000
(12:17 -0400)
committer
W. Trevor King
<wking@tremily.us>
Thu, 2 Aug 2012 16:21:14 +0000
(12:21 -0400)
For example, figures generated with the Agg backend don't have a
'show' method.
pyafm/afm.py
patch
|
blob
|
history
diff --git
a/pyafm/afm.py
b/pyafm/afm.py
index fc8dacbefc4f3d8e37c2776241e3206e6016b7dd..60741c63590615959b471298d7d041aa4dc3c368 100644
(file)
--- a/
pyafm/afm.py
+++ b/
pyafm/afm.py
@@
-486,7
+486,8
@@
class AFM (object):
axes.set_title('stepper approach {}'.format(timestamp))
plot = axes.plot(position, deflection, 'b.-')
figure.canvas.draw()
- figure.show()
+ if hasattr(figure, 'show'):
+ figure.show()
if not _matplotlib.is_interactive():
_matplotlib_pyplot.show()