However, if ITERMPLOT_FRAMES is defined, script without animation crashes:
$ ITERMPLOT_FRAMES=1 python docs/simple.py
Traceback (most recent call last):
File "docs/simple.py", line 3, in <module>
plt.show()
File "/Users/admin/anaconda/envs/py3k/lib/python3.5/site-packages/matplotlib/pyplot.py", line 252, in show
return _show(*args, **kw)
File "/Users/admin/code/itermplot/itermplot/__init__.py", line 119, in show
figmanager.show()
File "/Users/admin/code/itermplot/itermplot/__init__.py", line 250, in show
data = self.animate(loops, outfile)
File "/Users/admin/code/itermplot/itermplot/__init__.py", line 228, in animate
self.canvas.timer._on_timer()
AttributeError: 'FigureCanvasItermplot' object has no attribute 'timer'
The problem is when ITERMPLOT_FRAMES is defined itermplot expects the animation module to call new_timer to initialise the timer before calling show. For scripts that don't have animation, the timer was never initialized.
itermplot should work as no ITERMPLOT_FRAMES is set when the script does not call animation.
When ITERMPLOT_FRAMES is not defined, script works as expected:
However, if ITERMPLOT_FRAMES is defined, script without animation crashes:
The problem is when ITERMPLOT_FRAMES is defined itermplot expects the animation module to call new_timer to initialise the timer before calling show. For scripts that don't have animation, the timer was never initialized.
itermplot should work as no ITERMPLOT_FRAMES is set when the script does not call animation.