|
From: Fernando P. <fpe...@gm...> - 2008-07-07 18:14:43
|
On Mon, Jul 7, 2008 at 10:28 AM, Michael Droettboom <md...@st...> wrote: > Thank you for finding this! That is indeed the case. > > I think we need to rework the plot generation code to avoid side effects > by forcibly resetting state between plots. Maybe we should just fork > another Python process for each plot. Darren, since (I believe) you > wrote the initial documentation plotting code, do you have any thoughts? Isn't that unnecessarily slow? Why not have each plot simply make a call to load a clean state? rc_defaults() or somesuch? This little call could even be auto-run by the doc generation code, without requiring a full process restart. Basically I think MPL should be stateless enough to tolerate working in a long-lived process with repeatable results. Anything else should be considered a bug IMHO ;) (I know rcParams is precisely a stateful system, but it should be trivial to obtain a known clean state always, with a single call). Cheers, f |