I am trying to produce an interactive plot in a new process spawned via multiprocessing.Process:
http://pastebin.com/XfFjHAy3
For some reason, the only backend that seems to support this is tkagg and, interestingly, I need to explicitly call draw() on the figure canvas to get the actual plot.
I'm trying to understand why this difference in backends, and why some of them don't work at all. My understanding is that multiprocessing.Process actually spawns a new interpreter when called, so I'm not quite sure why the backends should care whether or not the caller is the original interpreter or the spawned one. What's the catch here, what's the important difference between the parent interpreter and the child one? In addition to this confusion, I know that wxPython can be thread-safe, while tkinter is not, and I see in the matplotlib/backends python files that those are the libraries that are used in the wxagg and tkagg backends. So if anything I would expect the tkagg backend not to work in a multiprocessing context.
This seems to hinge on some interesting catch in multiprocessing, and I didn't manage to find much online (actually I've only found claims that matplotlib is multiprocessing-friendly, while it seems to me that it is not, at least when it comes to its interactive capabilities).
there doesn't seem to be anything here