On 7/21/07, Darren Dale <[EMAIL PROTECTED]> wrote: > On Saturday 21 July 2007 3:12:44 pm Fernando Perez wrote: > > On 7/21/07, Darren Dale <[EMAIL PROTECTED]> wrote: > > > I'm working on converting our existing rc code to tconfig this weekend. > > > So far so good. I just wanted to let people know to avoid duplicating > > > effort. > > > > Excellent! Ping me if you have any problems. > > Im attaching a patch, it includes lots of changes to mplconfig.py, a realistic > mplrc.conf file (feel free to rename it to mpl.conf or matplotlib.conf or > whatever seems standard), and a backup of that .conf file. The mpltest lets > me try your trick of modifying a well formatted file in place. Very nice!
Is the patch against current SVN? I'm in a hurry and can't look at it now, so if you can double-check, that would be great. For tconfig.py, my last commit was: Last Changed Rev: 2532 Last Changed Date: 2007-07-21 15:19:06 -0600 (Sat, 21 Jul 2007) > A couple comments: > > 1) Comments in the config file must appear on a separate line from the > parameters, or they will be overwritten > > 2) It would be nice to be able to write a default file that has everything > commented out with the exception of backend.use and numerix. We comment out > all the parameters in the current matplotlibrc, which makes it easier to > identify what has been customized during troubleshooting. John and I just had a long conversation on this topic, and I think we have a reasonable solution. I have to run now, but I'll try to implement it tomorrow and will get back to you with more feedback. Sorry but I have guests coming now :) > 3) Any key appearing in the conf file is validated, so you cant mispell a key > name or accidentally include some garbage. But after generating the MPLConfig > object mplrc, you can do something like mplrc.nonsense = 1 without generating > an error. Is there a way to prevent the creation of additional attributes > once mplrc has been instantiated? That was a useful improvement to our > current rcParams. Yes, we can inherit from HasStrictTraits instead of HasTraits. I was in fact doing that but had some problem, can't remember what. I'm sure it's doable though. > 4) It would be nice to create a new mpl.conf file based on changes made > interactively, without having to overwrite the old file, yet still preserving > the order and comments seen in the default I attached. Maybe copying the > default into the new location, and using it as the template? Even better, > when I saved a new file, it would preserve the defaults order, and any > settings that are identical to the defaults would be commented out. Ok, I'm > getting carried away. sorry. > > > I'm going to try and finish hierarchical inclusion of files (aka > > ipython profiles) now. Consider for example a paper that requires > > black and white only styles. You could then have in that paper's > > directory a .matplotlib.conf file with: > > > > # paper-specific tweaks > > include = "$HOME/.matplotlib/matplotlib.conf" > > > > [lines] > > color = 'black' > > thickness = 2 > > > > etc. > > Thats a nice idea. > > > Or in your .matplotlib dir, you could keep multiple configurations > > that branch off the basic one for different needs, while keeping > > common defaults in one central location. > > > > In my first implementation I'll have to give up on safe roundtripping > > to files with recursion active, because it's a bit tricky to do both > > (not impossible). > > I'm feeling a bit cross-eyed from coding all day, and this is a little too > abstract at the moment for my poor head. Good luck! Yup, I'm pretty tired too. It seems we're all in the same carpal-tunnel-inducing marathon :) Thanks again for pitching in! Cheers, f ------------------------------------------------------------------------- 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