On Friday 20 July 2007 12:31:00 pm Brian Granger wrote: > > Damn, that is really cool. So you can generate default config files from > > the MPLConfig instance. We create a default matplotlibrc file from a > > template, setting default backend and numerix values based on what is > > available on the users system. It looks like it would be even easier with > > your scheme: import MPLConfig in setup.py, set the attributes, dump to a > > default config file. > > My thought for IPython is to have defaults set in the traited config > class itself so you wouldn't even have to do the second step. Just > import MPLConfig and dump to a file. I too think this is one of the > really nice benefits of this approach. Generating the default config > file for IPython1 was becoming a real problem.
Although, the config files generated this way are not very well organized, due to the seemingly random order that a dict's items are accessed. Look at the mpl3.conf file that is generated with Fernando's proof-of-concept: interactive = False backend = 'TkAgg' [figure] edgecolor = 'white' facecolor = 0.75 dpi = 100 figsize = [6.4000000000000004, 4.7999999999999998] [[subplot]] top = 0.90000000000000002 right = 0.90000000000000002 bottom = 0.10000000000000001 left = 0.125 [lines] linewidth = 2.0 linestyle = '-' [InitOnly] numerix = 'numpy' That is not too bad for small config files, but matplotlib's selection of rc parameters is pretty large, and it is nice to have them appear in the file in a meaningful order. Darren ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel