I am trying to work out some way to make rcdefaults() work with the traited 
config. Along the way, I discovered this in mplconfig:

    class mathtext(TConfig):
        cal = T.Trait("['cursive']", mplT.FontPropertiesHandler())
        rm = T.Trait("['serif']", mplT.FontPropertiesHandler())
        tt = T.Trait("['monospace']", mplT.FontPropertiesHandler())
        it = T.Trait("['serif'], style='oblique'", 
mplT.FontPropertiesHandler())
        bf = T.Trait("['serif'], weight='bold'", mplT.FontPropertiesHandler())
        sf = T.Trait("['sans-serif']", mplT.FontPropertiesHandler())
        use_cm = T.true
        fallback_to_cm = T.true

I dont think that will work. One of the highlights of the new config files is 
that when a file says:

[mathtext]
rm = ['serif', 'sans-serif']

you actually get a list, not a string, to pass to 
mplT.FontPropertiesHandler().  I discovered the code by trying to do this:

rcParams.update(rcParamsDefault)

Another thing about T.Trait to keep in mind:

T.Trait("['cursive']", mplT.FontPropertiesHandler())
"['cursive']" is the default value and is *not validated*. Nor is it 
necessarily an allowed value. For example:

 T.Trait('small', 'medium', 'large') 
'small' is the default value, but any future attempt to set that trait 
to 'small' will fail. Only items following the default are allowed.

 T.Trait('small', 'small', 'medium', 'large') 
Now 'small' is a valid setting.

Darren

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to