Hey everyone, Michael D and I are working on reducing the memory footprint of our test suite here at Sage days (we've made very good progress!), and came across a behavior of plt.clf() that we wanted feedback on.
At the moment, plt.clf (i.e. fig.clf) do not clear all of the state variable associated with a figure. I think the most consistent thing to do is to have a clf() change the figure to be the same as a freshly created plt.figure(), but this is not the case. For example: In [5]: f = plt.figure() In [6]: f.subplotpars.left Out[6]: 0.055 In [7]: f.subplotpars.left = .20 In [8]: f.clf() In [9]: f.subplotpars.left Out[9]: 0.20000000000000001 I propose making clf revert all variables back to their rcParams defaults (i.e. make it so that Out[9]: 0.055), and possibly creating a new rcParam to allow individuals to preserve the old behavior (in case people have code which relies on it, and prefer it to stay the same). Additionally, we could have an optional bolean parameter to clf, called 'scrub' or 'fresh' or something like that, which would implement the rcParam specified behavior by default, but allow users to scrub or not scrub on a call by call basis. Does anyone have any thoughts about this? -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel