Re: [matplotlib-devel] config with traits

2007-08-27 Thread Michael Droettboom
Michael Droettboom wrote: > Darren Dale wrote: >> On Wednesday 22 August 2007 4:20:08 pm Michael Droettboom wrote: >>> Darren Dale wrote: If you want all that flexibility, why not do it in the usual way: #mathtext.it.family : 'serif' #mathtext.it.style : 'oblique' >>> That seem

Re: [matplotlib-devel] config with traits

2007-08-23 Thread Michael Droettboom
Darren Dale wrote: > On Wednesday 22 August 2007 4:20:08 pm Michael Droettboom wrote: >> Darren Dale wrote: >>> If you want all that flexibility, why not do it in the usual way: >>> >>> #mathtext.it.family : 'serif' >>> #mathtext.it.style : 'oblique' >> That seems reasonable. I think I had a ment

Re: [matplotlib-devel] config with traits

2007-08-23 Thread Darren Dale
On Wednesday 22 August 2007 4:20:08 pm Michael Droettboom wrote: > Darren Dale wrote: > > On Wednesday 22 August 2007 03:09:30 pm Michael Droettboom wrote: > >> I realize it's hacky. The most obvious alternative is to expect a > >> dictionary here, e.g.: > >> > >>rm = { 'family': ['serif'], 's

Re: [matplotlib-devel] config with traits

2007-08-22 Thread Michael Droettboom
Darren Dale wrote: > On Wednesday 22 August 2007 03:09:30 pm Michael Droettboom wrote: >> I realize it's hacky. The most obvious alternative is to expect a >> dictionary here, e.g.: >> >>rm = { 'family': ['serif'], 'style': 'oblique' } >> >> But that's less like the FontProperties constructor.

Re: [matplotlib-devel] config with traits

2007-08-22 Thread Darren Dale
On Wednesday 22 August 2007 03:09:30 pm Michael Droettboom wrote: > This was an attempt to do a direct translation from what I had in the > "classic" rcsetup.py. (The previous version in mplconfig.py was > semantically incorrect.) I had tested this with settings in my > matplotlib.conf, but didn'

Re: [matplotlib-devel] config with traits

2007-08-22 Thread Michael Droettboom
I've committed a fix so this at least works. (We can change how the trait is specified later if necessary.) The validation is not as tight as it should be, yet. I think I've passed through this bug onto another one, though: Traceback (most recent call last): File "", line 1, in File "

Re: [matplotlib-devel] config with traits

2007-08-22 Thread Michael Droettboom
This was an attempt to do a direct translation from what I had in the "classic" rcsetup.py. (The previous version in mplconfig.py was semantically incorrect.) I had tested this with settings in my matplotlib.conf, but didn't realise that the default wasn't validated (and thus not interpreted

[matplotlib-devel] config with traits

2007-08-22 Thread Darren Dale
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())