esdalmaijer / PyGazeAnalyser

Analysis and high-level plotting toolbox for eye-tracking data
GNU General Public License v3.0
146 stars 89 forks source link

Memory error for when the number of files greater than 12 #4

Open nakohli opened 9 years ago

nakohli commented 9 years ago

Hi,

I have a file which contains readings from pytribe for more than 20 images. However, when I use the analyzer for doing the analysis, I get an error after the 12th one. The issue is with opening too many handles for the figures when its saving it.

It can easily be handled by splitting the files into two and doing the analysis but I just wanted to notify you regarding the error.

Thanks

nakohli commented 9 years ago

Setting fig.clf() and pyplot.close() in the draw methods of gazeplotter seems to have cleared the issue.

esdalmaijer commented 9 years ago

Thanks for looking into this. How much of an issue this is, should be a matter of your PCs specs. Also note that the plotting functions are designed to return handles to the Figure and Axes that were produced by the functions. This could be useful for further editing, but also means you will have to actively close them (e.g. by calling matplotlib.close(fig)).