multiprocessing module and matplotlib.pyplot/PdfPages

Chris Angelico rosuav at gmail.com
Tue Apr 21 11:58:53 EDT 2015


On Wed, Apr 22, 2015 at 1:53 AM, Paulo da Silva
<p_s_d_a_s_i_l_v_a_ns at netcabo.pt> wrote:
> Yes, I have 8 cores and the graphics' processes calculation are all
> independent. The problem I have is that if there is any way to generate
> independent figures in matplotlib. The logic seems to be build the
> graphic and save it. I was trying to know if there is any way to build
> graphic objects that can be built in parallel and, at the end, saved by
> the controller task.

The very simplest way would be to simply spawn entirely separate
Python processes. Each one would import matplotlib independently, do
its work, and save its figure. Would that work for what you're trying
to do?

ChrisA



More information about the Python-list mailing list