On Mon, Jul 16, 2012 at 6:06 PM, Tony Yu <tsy...@gmail.com> wrote:

>
>
> On Mon, Jul 16, 2012 at 3:07 PM, John Hunter <jdh2...@gmail.com> wrote:
>
>>
>>
>> On Tue, Jul 10, 2012 at 11:58 AM, Tony Yu <tsy...@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
>>     style.use('ieee.transaction')
>>     ...make_a_plot_...
>>     style.use('ggplot')
>> .    ..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
>>     matplotlib.rc_file_defaults()
>>     plt.close('all')
>>     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:
>>
>>     style.use('default')
>>
>> or:
>>
>>     style.reset()
>>
>> which would take you back to a clean slate.
>>
>>
> I've been using plt.rcdefaults() for that purpose. Does that work for you?
>
> -Tony
>

Err, maybe I read your question wrong. Were you just suggesting that I wrap
`matplotlib.rc_file_defaults()` in a new function called `style.reset()`,
or were you suggesting a function that does something different than
`rc_file_defaults`?

-Tony
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to