[matplotlib-devel] Experimental, traited config module available in svn
I just committed changes in svn that will allow matplotlib to use the experimental traited mplconfig module. The traited config object itself is called mplConfig, but I wrapped it in an object called rcParams to make it compatible with matplotlib, so we can kick the tires without extensive changes. Some notes: - All of the code associated with reading config files and creating config objects has been organized into an experimental config package, and is therefore disabled by default. To enable the config package, set "NEWCONFIG = True" in matplotlib.__init__.py. - Once enabled, the config package supports either the old matplotlibrc files (used by the rcparams module) or the newer matplotlib.conf files (used by the traited mplconfig module). The config package defaults to the traited mplconfig option. The config package will use the old matplotlibrc system if you set "USE_TRAITED_CONFIG = False" in matplotlib/config/__init__.py -The traited config module will create a new matplotlib.conf file from a standard matplotlibrc file when appropriate. -Fernando's tconfig module will not work with the version of traits ships with matplotlib (we can update our version when Enthought makes their release). This will get you a more recent version: sudo easy_install -f http://code.enthought.com/enstaller/eggs/source/unstable "enthought.traits < 3.0a" I ran backend_driver with the traited config enabled, and the only errors I got were related to broken mathtext support in backend_svg, and I think those are unrelated to my changes. If you have the luxury, please update from svn and try working with the traited config module enabled. Any feedback would be appreciated. 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
Re: [matplotlib-devel] Experimental, traited config module available in svn
Darren Dale wrote: > I ran backend_driver with the traited config enabled, and the only errors I > got were related to broken mathtext support in backend_svg, and I think those > are unrelated to my changes. > I think I broke that for a few hours this morning, but it's working for me now. Next time you update, please let me know if it still isn't working for you. Cheers, Mike - 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
Re: [matplotlib-devel] Experimental, traited config module available in svn
Darren Dale wrote: > On Monday 30 July 2007 03:33:11 pm you wrote: > >> Darren Dale wrote: >> >>> I ran backend_driver with the traited config enabled, and the only errors >>> I got were related to broken mathtext support in backend_svg, and I think >>> those are unrelated to my changes. >>> >> I think I broke that for a few hours this morning, but it's working for >> me now. Next time you update, please let me know if it still isn't >> working for you. >> > > It's still broken here: > > File > "/usr/lib64/python2.5/site-packages/matplotlib-0.90.1_r3636-py2.5-linux-x86_64.egg/matplotlib/backends/backend_svg.py", > > line 378, in _draw_mathtext > (fontsize, fontname)) > NameError: global name 'fontname' is not defined > Should be fixed now. The bug was only exercised when svg.embed_char_paths was turned off. Cheers, Mike - 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
Re: [matplotlib-devel] Experimental, traited config module available in svn
On Monday 30 July 2007 4:49:24 pm Eric Firing wrote: > Darren, > > When I make a clean build and install, set NEWCONFIG, and try to run I > get a permission problem. It looks like the problem is that the global > matplotlib.conf is not getting generated and installed at build/install > time, but I have not investigated it. That was exactly the problem, I forgot to add the new file to the setup script. It is fixed in svn 3640. 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
Re: [matplotlib-devel] Experimental, traited config module available in svn
Darren, When I make a clean build and install, set NEWCONFIG, and try to run I get a permission problem. It looks like the problem is that the global matplotlib.conf is not getting generated and installed at build/install time, but I have not investigated it. Eric convert! Traceback (most recent call last): File "backend_driver.py", line 20, in import matplotlib.backends as mplbe File "/usr/local/lib/python2.5/site-packages/matplotlib/__init__.py", line 712, in from config import rcParams, rcdefaults File "/usr/local/lib/python2.5/site-packages/matplotlib/config/__init__.py", line 10, in from mplconfig import rcParams, mplConfig, save_config, rcdefaults File "/usr/local/lib/python2.5/site-packages/matplotlib/config/mplconfig.py", line 473, in filePriority=True) File "/usr/local/lib/python2.5/site-packages/matplotlib/config/tconfig.py", line 549, in __init__ rconf = RecursiveConfigObj(configFilename) File "/usr/local/lib/python2.5/site-packages/matplotlib/config/tconfig.py", line 311, in __init__ self.conf = self._load(filename) File "/usr/local/lib/python2.5/site-packages/matplotlib/config/tconfig.py", line 314, in _load conf = mkConfigObj(filename,makeMissingFile) File "/usr/local/lib/python2.5/site-packages/matplotlib/config/tconfig.py", line 289, in mkConfigObj unrepr=True) File "/usr/local/lib/python2.5/site-packages/matplotlib/config/configobj.py", line 1189, in __init__ h = open(infile, 'w') IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.5/site-packages/matplotlib/mpl-data/matplotlib.conf' - 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
Re: [matplotlib-devel] Experimental, traited config module available in svn
Darren, It looks like there is a problem with the grid lines. Although the matplotlib.conf file is specifying linestyle = ':', and False for the axes.grid parameter, everything is coming up with solid lines (see barh_demo.py, for example) by default. It looks like those two keys are not setting their respective rcParams entries. Eric - 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
Re: [matplotlib-devel] Experimental, traited config module available in svn
Darren Dale wrote: > I just committed changes in svn that will allow matplotlib to use the > experimental traited mplconfig module. The traited config object itself is > called mplConfig, but I wrapped it in an object called rcParams to make it > compatible with matplotlib, so we can kick the tires without extensive > changes. Darren, There is *major* speed problem. Running "backend_driver.py Template": 0.95 minutes with NEWCONFIG = True 0.51 minutes False Eric - 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
Re: [matplotlib-devel] Experimental, traited config module available in svn
On Monday 30 July 2007 7:10:01 pm Eric Firing wrote: > Darren Dale wrote: > > I just committed changes in svn that will allow matplotlib to use the > > experimental traited mplconfig module. The traited config object itself > > is called mplConfig, but I wrapped it in an object called rcParams to > > make it compatible with matplotlib, so we can kick the tires without > > extensive changes. > > Darren, > > There is *major* speed problem. Running "backend_driver.py Template": > > 0.95 minutes with NEWCONFIG = True > 0.51 minutes False It looks like creating the mplConfig object is adding to the startup time. I'll look into it when I get a chance. 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
Re: [matplotlib-devel] Experimental, traited config module available in svn
On Monday 30 July 2007 6:58:17 pm Eric Firing wrote: > Darren, > > It looks like there is a problem with the grid lines. Although the > matplotlib.conf file is specifying linestyle = ':', and False for the > axes.grid parameter, everything is coming up with solid lines (see > barh_demo.py, for example) by default. It looks like those two keys are > not setting their respective rcParams entries. barh_demo turns the grid on. I accidentally set the default linestyle to '-' in mplconfig for the grids, thats been fixed. - 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
Re: [matplotlib-devel] Experimental, traited config module available in svn
Darren Dale wrote: > On Monday 30 July 2007 6:58:17 pm Eric Firing wrote: >> Darren, >> >> It looks like there is a problem with the grid lines. Although the >> matplotlib.conf file is specifying linestyle = ':', and False for the >> axes.grid parameter, everything is coming up with solid lines (see >> barh_demo.py, for example) by default. It looks like those two keys are >> not setting their respective rcParams entries. > > barh_demo turns the grid on. I accidentally set the default linestyle to '-' > in mplconfig for the grids, thats been fixed. Darren, barh_demo turns the grid on for the first plot only, but the grid is shown for both. ipython -pylab also plots with a grid by default, and shows In [3]:rcParams['axes.grid'] Out[3]:True I have not made any matplotlib.conf other than the one that is now being installed correctly in mpl-data, and it contains # display grid on regular or polar axes grid = False polargrid = True grep indicates the True value is coming from mplconfig: config/mplconfig.py:grid = T.Trait(True, mplT.BoolHandler()) config/rcsetup.py:'axes.grid' : [False, validate_bool] so it looks like somehow this mplconfig initialization is overriding the value in matplotlib.conf. Eric - 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