Norbert, >>> The core problem: The matplotlibrc file distributed with matplotlib >>> contains all the default values in non-commented lines. This file is >>> usually copied to the home-directory of any user, making it impossible >>> to simply change any default value in later versions. It is not possible >>> to find out which values in the users matplotlibrc were set on purpose >>> and which were just left untouched from the distributed file. >>> >>> The better solution: place '#' at the beginning of every line in >>> matplotlibrc.template (except for 'backend' and 'numerix' which carry >>> important information) Any user who explicitely wants to change a value, >>> can simply uncomment the line and set a value. Otherwise, the default >>> value from matplotlib/__init__.py will remain active, even if changed in >>> an update. Of course, this would only make sense, if users were informed >>> and encouraged to replace their personal matplotlibrc >>> >> This seems like a good idea, and one that is consistent with the way >> many other configurable systems are often handled. I think that >> regardless of what else is done, this would reduce pain during updates; >> it would also make it easier for the user to see what changes to the >> defaults he/she has made. >> > So, should we simply do that? The only problem that I see is, that > matplotlibrc.template will probably soon be out of sync with > defaultParams in __init__.py, once there is no necessity for developers > to update it. > >>> The ultimate solution: The file matplotlib.template should probably be >>> dropped completely and be auto-created from the information in >>> matplotlib/__init__.py - this would remove quite some redundancy and >>> potential for inconsistencies. >>> >> Reducing redundancy is appealing, but I don't know if it would be worth >> the effort of implementing your auto-generation idea--which might add >> clutter and complexity to __init__.py. >> > Not necessarily. I was thinking of moving defaultParams out of > __init__.py to a separate file, which can be imported by setup.py to > write matplotlibrc. This would even reduce the complexity of > __init__.py. However, it will need some cleanup first to reduce > dependencies. I've started on that, but it will take some more time. > > In any case, this auto-generation would solve the problem of a > increasingly outdated matplotlibrc.template.
Before going too far with all this, it would be good to hear from John and others. It all sounds good to me, but others might have objections or good alternatives that should be considered. To summarize, your two proposals are: 1) generate matplotlibrc with almost everything commented out by default 2) eliminate matplotlibrc.template by having setup.py autogenerate matplotlibrc based on the rcParams-related code that is presently in __init__.py. Eric ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel