Matplotlib performance problem: savefig too slow, any alternative?

534 views Asked by At

I am generating a matplotlib figure which consists of 2 subplots: A 3D plot with updated data each time (Poly3dcollection) and an image file that I plug in with plt.imshow().

I am able to save the this figure by plt.savefig, however, savefig is very slow for my application since I need to save ~4 million of these figures. I already tried saving in different file formats with various parameters, saving it into memory and than read it by PIL to save by PIL.save etc. None of the solutions that I could find made the saving of the figure in less than a second.

I`d very much appreciate if someone has a suggestion for this but I need a major increase in performance, minor changes will not matter a lot.

0

There are 0 answers