On Mon, Jul 16, 2012 at 3:07 PM, John Hunter <jdh2358@gmail.com> wrote:

On Tue, Jul 10, 2012 at 11:58 AM, Tony Yu <tsyu80@gmail.com> wrote:
Announcement: mpltools 0.1

mpltools is a package of tools for matplotlib. For the most part, these tools are only loosely-connected in functionality, but there are two that may prove particularly useful:

Styles and plot2rst

Tony, is there  a way to "switch" styles rather than chain them.  Eg, if I do:

    import mpltools.style as style
.    ..make_a_plot_...

I seem to get the chained behavior of the second style updating the first.  I'd like to use this in a demo context where I can illustrate the styles separately, so it would be nice to go back to the defaults.

Interestingly, I tried to do:

    import matplotlib
    hist(rand(10000), 100)

but that simply stopped figures from raising all together (I don't think this is related to mpltools, but to something funny going on on my system).

So in summary, it would be nice to be able to do something like:




which would take you back to a clean slate.

I've been using plt.rcdefaults() for that purpose. Does that work for you?