On Sat, Jul 20, 2013 at 9:10 PM, David P. Sanders <
dpsand...@ciencias.unam.mx> wrote:

>
>
>
> On Sat, Jul 20, 2013 at 8:48 PM, Chris Beaumont <beaum...@hawaii.edu>wrote:
>
>>
>>
<snip>


>  However, default tweaking need not be painful. As has been mentioned, a
>> first step would be an easier way to change a whole set of rcParams:
>> something like mpl.set_style('style-name'). As long as one style is
>> 'classic', users can keep the current style for as long as they want. It's
>> a one line fix, and could even be rcParams-settable.
>>
>
> This is already implemented! The problem is, it's hidden away in the
> mpltools toolkit:
>
> http://tonysyu.github.io/mpltools/
>
> which nobody seems to know about or use, which is a great shame, since
> it's first class -- great job, Tony!
>
> The first example there is:
>
> >>> from mpltools import style>>> style.use('ggplot')
>
> and then the plot is suddenly jaw-droppingly beautiful!
>
> This is achieved with style files which just have lists of matplotlib
> params like this:
>
> patch.linewidth = 0.5
> patch.facecolor = '#348ABD'  # blue
> patch.edgecolor = '#EEEEEE'
> patch.antialiased = True
>
> These are parsed using the ConfigObj package (this package parses config
> files of this type).
>
> Somebody (Chris?) tweeted something about the Vega package earlier:
> http://trifacta.github.io/vega/
>
> They seem to have these kind of things solved already (disclaimer: I only
> browsed briefly their site) using JSON, but actually Tony's approach seems
> like a winner.
>
> mpltools may be installed with
>
> > pip install ConfigObj
> > pip install mpltools
>
> [For some reason the dependency on ConfigObj is not registered in
> mpltools. Tony, are you the packager?]
>

I'm not really sure why the configobj dependency doesn't resolve properly.
As they say: pull requests are welcome. ;)

This is all *crying out* to be dropped straight into matplotlib proper!
>

Here's a PR to add the style sheets from mpltools:
https://github.com/matplotlib/matplotlib/pull/2236

(using matplotlib's parser instead of ConfigObj)

Cheers!
-Tony



> David
>
>
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to