You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(33) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(7) |
Feb
(44) |
Mar
(51) |
Apr
(43) |
May
(43) |
Jun
(36) |
Jul
(61) |
Aug
(44) |
Sep
(25) |
Oct
(82) |
Nov
(97) |
Dec
(47) |
2005 |
Jan
(77) |
Feb
(143) |
Mar
(42) |
Apr
(31) |
May
(93) |
Jun
(93) |
Jul
(35) |
Aug
(78) |
Sep
(56) |
Oct
(44) |
Nov
(72) |
Dec
(75) |
2006 |
Jan
(116) |
Feb
(99) |
Mar
(181) |
Apr
(171) |
May
(112) |
Jun
(86) |
Jul
(91) |
Aug
(111) |
Sep
(77) |
Oct
(72) |
Nov
(57) |
Dec
(51) |
2007 |
Jan
(64) |
Feb
(116) |
Mar
(70) |
Apr
(74) |
May
(53) |
Jun
(40) |
Jul
(519) |
Aug
(151) |
Sep
(132) |
Oct
(74) |
Nov
(282) |
Dec
(190) |
2008 |
Jan
(141) |
Feb
(67) |
Mar
(69) |
Apr
(96) |
May
(227) |
Jun
(404) |
Jul
(399) |
Aug
(96) |
Sep
(120) |
Oct
(205) |
Nov
(126) |
Dec
(261) |
2009 |
Jan
(136) |
Feb
(136) |
Mar
(119) |
Apr
(124) |
May
(155) |
Jun
(98) |
Jul
(136) |
Aug
(292) |
Sep
(174) |
Oct
(126) |
Nov
(126) |
Dec
(79) |
2010 |
Jan
(109) |
Feb
(83) |
Mar
(139) |
Apr
(91) |
May
(79) |
Jun
(164) |
Jul
(184) |
Aug
(146) |
Sep
(163) |
Oct
(128) |
Nov
(70) |
Dec
(73) |
2011 |
Jan
(235) |
Feb
(165) |
Mar
(147) |
Apr
(86) |
May
(74) |
Jun
(118) |
Jul
(65) |
Aug
(75) |
Sep
(162) |
Oct
(94) |
Nov
(48) |
Dec
(44) |
2012 |
Jan
(49) |
Feb
(40) |
Mar
(88) |
Apr
(35) |
May
(52) |
Jun
(69) |
Jul
(90) |
Aug
(123) |
Sep
(112) |
Oct
(120) |
Nov
(105) |
Dec
(116) |
2013 |
Jan
(76) |
Feb
(26) |
Mar
(78) |
Apr
(43) |
May
(61) |
Jun
(53) |
Jul
(147) |
Aug
(85) |
Sep
(83) |
Oct
(122) |
Nov
(18) |
Dec
(27) |
2014 |
Jan
(58) |
Feb
(25) |
Mar
(49) |
Apr
(17) |
May
(29) |
Jun
(39) |
Jul
(53) |
Aug
(52) |
Sep
(35) |
Oct
(47) |
Nov
(110) |
Dec
(27) |
2015 |
Jan
(50) |
Feb
(93) |
Mar
(96) |
Apr
(30) |
May
(55) |
Jun
(83) |
Jul
(44) |
Aug
(8) |
Sep
(5) |
Oct
|
Nov
(1) |
Dec
(1) |
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(1) |
Oct
(3) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(7) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1
(3) |
2
(7) |
3
(5) |
4
(1) |
5
(36) |
6
(36) |
7
|
8
(7) |
9
(23) |
10
(24) |
11
(6) |
12
(16) |
13
(34) |
14
(5) |
15
|
16
(34) |
17
(25) |
18
(13) |
19
(26) |
20
(64) |
21
(26) |
22
(20) |
23
(10) |
24
(24) |
25
(23) |
26
(13) |
27
(15) |
28
(1) |
29
(4) |
30
(9) |
31
(9) |
|
|
|
|
On 7/24/07, Darren Dale <dd...@co...> wrote: > Thank you for all you have already done, Fernando. My pleasure. I hope this will be useful for all of us, and that we can offer to users unified mechanisms for dealing with the various pieces of the 'scientific python toolkit' puzzle. > I tried adding a bogus key to mplrc.conf (top level, bogus = 1), and ran the > mpltest.py script from IPython. The result is posted at the end of this > message. Would it be possible to provide some more context for bad sections > or keys? Like the section in which the key is located, the line number, or a > list of acceptable keys for that section? I think it will be necessary for > the error to relay the absolute path and file that failed, especially with > nested configs. We could catch that error, and point to the default conf that > ships with matplotlib, but a little additional information from tconfig would > be helpful. I can't pull line number information from ConfigObj: http://www.voidspace.org.uk/python/configobj.html#todo (see last line), but now the exception message reads: TConfigInvalidKeyError: ConfigObj with filename: 'mplrc.conf' Contains the following invalid keys: ['bogus'] The valid keys for this section are: ['maskedarray', 'datapath', 'numerix', 'timezone', 'toolbar', 'interactive'] and similarly for invalid sections. At least with the filename and the list of bad/good values, people should be able to fend for themselves. If not, let them use matlab :) Please update and let me know what happens. > It might be nice to be able to deprecate keys as matplotlib or ipython > evolves. Even with our current system, when we give a helpful message that a > key is no longer valid, we will sometimes get questions on the mailing lists > asking how to fix the problem. Raising an error for unrecognized keys might > be too extreme. Maybe TConfig should have a raiseOnKeyError option, so that > bad values can be reported with a warning instead, and the end user can get > up and running without fixing it right away. As I told John, you can already do that: when you deprecate a Key, simply change it from class Foo(TConfig): somekey = T.Int to somekey = DeprecatedKey where DeprecatedKey is a Trait you declare, whose handler/validator provides the necessary information to the user, sends warnings, it can even set the proper value in the new form of that information if it makes sense, etc. Use the Traits, Luke :) Cheers, f
On Tuesday 24 July 2007 6:43:03 pm Chris Barker wrote: > Sorry to play devil's advocate here, but the question remains -- MPL > developers (John, primarily, I suppose): > > Why not dump MPL1, and work on a nice pylab-like front end to Chaco, > while giving the "love" to the Kiva PS, PDF, SVG back-ends (and add GTK > -- if it's not there)? > > Most users, like me, just want something that does the job for us. I > know I'm going to take a look at Chaco again. > > Add the skills of the MPL team to Chaco, and it could really shine! I could quickly find myself out of my depth on this topic, so I'll just make a couple quick points. I need to create plots for qt4 projects at my lab, and I have grown really accustomed to the quality of mpl's eps output when usetex is enabled. Darren
On Tuesday 24 July 2007 5:49:27 pm Fernando Perez wrote: > On 7/24/07, Darren Dale <dd...@co...> wrote: > > creating RecursiveConfManager with no_mplrc.conf, which does not exist > > calling RecursiveConfigManagers write() method > > Here are the contents of no_mplrc.conf: > > > > > > I might have expected to see the MPLConfig defaults > > Nope. The point is that a top-level file may well start empty, > without even an 'include' statement at all, and as the user changes > things (via the cmd line or edit_traits()), ONLY those changes will be > written in. Ah! (Smacks self on forehead) > This way, users don't carry a lot of declaration of > internal defaults that may potentially change as MPL evolves; this > minimizes the chances for config errors appearing in the future when > they upgrade. > > > Backend now changed to: Cairo > > calling RecursiveConfigManagers write() method > > Here are the new contents of no_mplrc.conf: > > > > > > in this test, dsd finds that no_mplrc.conf is empty after both writes > > I suggest that tconfig should either write to the file, or raise an > > error when the file does not exist > > removing no_mplrc.conf > > Fixed. See note on file creation at end. Great! > > ------------------------------------------------------------------------ > > > > moving mplrc.conf to mplrc.conf.off > > copying mplrc2.conf to mplrc2_copy.conf > > loading config from mplrc2_copy.conf, which includes mplrc.conf- > > but mplrc.conf does not exist > > here are the contents of mplrc2_copy.conf, as loaded > > > > # A hierarchical configuration > > include = 'mplrc.conf' > > > > Backend now changed to: Cairo > > writing to file > > Here are the new contents of mplrc2_copy.conf: > > > > # A hierarchical configuration > > include = 'mplrc.conf' > > > > I might have expected to see the backend.use here > > maybe an error should be raised when a config file includes another > > config file that does not exist > > moving mplrc.conf.off to mplrc.conf, deleting mplrc2_copy.conf > > Fixed, now raises IOError. Great! > I implemented this policy: > > 1. Creating a TConfigManager(FooConfig,'missingfile.conf') will work > fine, and 'missingfile.conf' will be created empty. > > 2. Creating TCM(C,'OKfile.conf') where OKfile.conf has > > include = 'missingfile.conf' > > conks out with IOError. > > My rationale is that creating top-level empty files is a common and > reasonable need, but that having invalid include statements should > raise an error right away, so people know immediately that their files > have gone stale. > > It seems to me that this system does everything John and I discussed > over the phone on Sat, and that others have mentioned here. > Basically, MPL could install at startup time a simple matplotlib.conf > file that reads: > > # MPL config file. For configuration details, try exloring > # pylab.rc > # If you are using WX or IPython with -wthread, you can try > # pylab.rc.edit_traits() > # for a GUI. > # This file: > # /path/to/full/copy/of/mpl/internal/mpl.conf > # is an auto-generated file with the complete current internal defaults. > # Feel free to copy pieces you need from it if you prefer. > # Note that you can create hierarchies of config files by using > # include = '/path/to/base.conf' > # For more details on MPL's config system, see > # http://matplotlib.sf.net/great/information/page.html > > ### EOF > > That's it. Exactly zero actual data in the default file, just some > information to get people going. This file will only grow what people > actually change, thus minimizing the chances for problems that pop > like dandelions as upgrades happen. > > In addition, even users who don't run with WX* backends could always > just start ipython -wthread to tweak their config, save it, and then > go back to using whatever they normally work with in production. WX > would only be needed for the traits GUI to open, not for any of MPL > itself. > > Comments, feedback? Thank you for all you have already done, Fernando. I tried adding a bogus key to mplrc.conf (top level, bogus = 1), and ran the mpltest.py script from IPython. The result is posted at the end of this message. Would it be possible to provide some more context for bad sections or keys? Like the section in which the key is located, the line number, or a list of acceptable keys for that section? I think it will be necessary for the error to relay the absolute path and file that failed, especially with nested configs. We could catch that error, and point to the default conf that ships with matplotlib, but a little additional information from tconfig would be helpful. It might be nice to be able to deprecate keys as matplotlib or ipython evolves. Even with our current system, when we give a helpful message that a key is no longer valid, we will sometimes get questions on the mailing lists asking how to fix the problem. Raising an error for unrecognized keys might be too extreme. Maybe TConfig should have a raiseOnKeyError option, so that bad values can be reported with a warning instead, and the end user can get up and running without fixing it right away. Darren <class 'tconfig.TConfigInvalidKeyError'> Traceback (most recent call last) /home/darren/src/ipython1/sandbox/tconfig/mpltest.py in <module>() 10 11 mconf = 'mplrc.conf' ---> 12 mplconf = TConfigManager(MPLConfig, mconf, filePriority=True) 13 mplconf.tconf.backend.use = 'Qt4Agg' 14 mplconf.write() /home/darren/src/ipython1/sandbox/tconfig/tconfig.py in __init__(self, configClass, configFilename, filePriority) 539 540 if filePriority: --> 541 self.tconf = configClass(self.fconfCombined,monitor=monitor) 542 else: 543 # Push defaults onto file object /home/darren/src/ipython1/sandbox/tconfig/tconfig.py in __init__(self, config, parent, monitor) 369 invalid_scalars = cf_scalars - my_scalars 370 if invalid_scalars: --> 371 raise TConfigInvalidKeyError("Invalid keys: %s" % invalid_scalars) 372 373 # ... and sections <class 'tconfig.TConfigInvalidKeyError'>: Invalid keys: set(['bogus']) WARNING: Failure executing file: <mpltest.py>
Peter Wang wrote: > On Jul 19, 2007, at 5:31 PM, Christopher Barker wrote: >> OK. I have to ask -- why aren't we all just using Chaco? > Most of ETS is being developed, tested, and run on Windows, Mac, and > Linux every day. Ah, great to know -- that was decidedly not the case the last time I took a good look at Chaco. > Long ago we factored out Chaco's > underlying drawing layer into a package called Kiva. That was there from the beginning if I recall, which is great. > Kiva's PS, PDF, SVG, and GL backends > could all use a little love, but they were functioning at one point > in time. Sorry to play devil's advocate here, but the question remains -- MPL developers (John, primarily, I suppose): Why not dump MPL1, and work on a nice pylab-like front end to Chaco, while giving the "love" to the Kiva PS, PDF, SVG back-ends (and add GTK -- if it's not there)? Most users, like me, just want something that does the job for us. I know I'm going to take a look at Chaco again. Add the skills of the MPL team to Chaco, and it could really shine! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...
On 7/24/07, Darren Dale <dd...@co...> wrote: > Hi Fernando, > > On Tuesday 24 July 2007 1:34:47 pm Fernando Perez wrote: > > Just so we save time, would you mind just coding up the failure as a test? > > It is attached. Here is the output on my machine: Great, thanks. Please update. My comments are inlined now: > > copying mplrc.conf to mplrc_copy.conf > loading from mplrc_copy.conf > Backend loaded from file: Qt4Agg > Backend now changed to Cairo in tconfig object > writing file > reloading from mplrc_copy.conf > Backend reloaded from file: Cairo > It should be Cairo > deleting mplrc_copy.conf This one is OK. >-------------------------------------------------------------------------------- > > creating RecursiveConfManager with no_mplrc.conf, which does not exist > calling RecursiveConfigManagers write() method > Here are the contents of no_mplrc.conf: > > > I might have expected to see the MPLConfig defaults Nope. The point is that a top-level file may well start empty, without even an 'include' statement at all, and as the user changes things (via the cmd line or edit_traits()), ONLY those changes will be written in. This way, users don't carry a lot of declaration of internal defaults that may potentially change as MPL evolves; this minimizes the chances for config errors appearing in the future when they upgrade. > Backend now changed to: Cairo > calling RecursiveConfigManagers write() method > Here are the new contents of no_mplrc.conf: > > > in this test, dsd finds that no_mplrc.conf is empty after both writes > I suggest that tconfig should either write to the file, or raise an > error when the file does not exist > removing no_mplrc.conf Fixed. See note on file creation at end. > ------------------------------------------------------------------------ > > moving mplrc.conf to mplrc.conf.off > copying mplrc2.conf to mplrc2_copy.conf > loading config from mplrc2_copy.conf, which includes mplrc.conf- > but mplrc.conf does not exist > here are the contents of mplrc2_copy.conf, as loaded > > # A hierarchical configuration > include = 'mplrc.conf' > > Backend now changed to: Cairo > writing to file > Here are the new contents of mplrc2_copy.conf: > > # A hierarchical configuration > include = 'mplrc.conf' > > I might have expected to see the backend.use here > maybe an error should be raised when a config file includes another > config file that does not exist > moving mplrc.conf.off to mplrc.conf, deleting mplrc2_copy.conf Fixed, now raises IOError. > -------------------------------------------------------------------------- I implemented this policy: 1. Creating a TConfigManager(FooConfig,'missingfile.conf') will work fine, and 'missingfile.conf' will be created empty. 2. Creating TCM(C,'OKfile.conf') where OKfile.conf has include = 'missingfile.conf' conks out with IOError. My rationale is that creating top-level empty files is a common and reasonable need, but that having invalid include statements should raise an error right away, so people know immediately that their files have gone stale. It seems to me that this system does everything John and I discussed over the phone on Sat, and that others have mentioned here. Basically, MPL could install at startup time a simple matplotlib.conf file that reads: # MPL config file. For configuration details, try exloring # pylab.rc # If you are using WX or IPython with -wthread, you can try # pylab.rc.edit_traits() # for a GUI. # This file: # /path/to/full/copy/of/mpl/internal/mpl.conf # is an auto-generated file with the complete current internal defaults. # Feel free to copy pieces you need from it if you prefer. # Note that you can create hierarchies of config files by using # include = '/path/to/base.conf' # For more details on MPL's config system, see # http://matplotlib.sf.net/great/information/page.html ### EOF That's it. Exactly zero actual data in the default file, just some information to get people going. This file will only grow what people actually change, thus minimizing the chances for problems that pop like dandelions as upgrades happen. In addition, even users who don't run with WX* backends could always just start ipython -wthread to tweak their config, save it, and then go back to using whatever they normally work with in production. WX would only be needed for the traits GUI to open, not for any of MPL itself. Comments, feedback? Cheers, f
On Jul 24, 2007, at 10:46 AM, Gael Varoquaux wrote: > > AFAIK chaco is based on this approach. Not as such. Chaco uses traits for its high-level plot objects but the rendering system, Kiva, does not appear to use traits all. mpl1.py is using traits to maintain pre-calculated affine transformation matrices and graphics styles for each plot object. I believe this approach is confusing and results in rendering code that is hard to understand and optimize. > It makes a very nice API to use in interactive programs. I agree that an attribute-based API would much nicer for the high- level plot objects like Figure and Axes. However, I don't think traits are a technical necessity to accomplish that goal. > As far as understanding and optimizing it would be nice to see if > Peter Wang has something to say about this. It would be great to learn how Chaco/Kiva caches the things that I think of as "canvas primitives", like native AGG paths. I'd also be interested in learning how the transformation model is implemented in Chaco. Ken
Hi Fernando, On Tuesday 24 July 2007 1:34:47 pm Fernando Perez wrote: > Just so we save time, would you mind just coding up the failure as a test? It is attached. Here is the output on my machine: copying mplrc.conf to mplrc_copy.conf loading from mplrc_copy.conf Backend loaded from file: Qt4Agg Backend now changed to Cairo in tconfig object writing file reloading from mplrc_copy.conf Backend reloaded from file: Cairo It should be Cairo deleting mplrc_copy.conf -------------------------------------------------------------------------------- creating RecursiveConfManager with no_mplrc.conf, which does not exist calling RecursiveConfigManagers write() method Here are the contents of no_mplrc.conf: I might have expected to see the MPLConfig defaults Backend now changed to: Cairo calling RecursiveConfigManagers write() method Here are the new contents of no_mplrc.conf: in this test, dsd finds that no_mplrc.conf is empty after both writes I suggest that tconfig should either write to the file, or raise an error when the file does not exist removing no_mplrc.conf -------------------------------------------------------------------------------- moving mplrc.conf to mplrc.conf.off copying mplrc2.conf to mplrc2_copy.conf loading config from mplrc2_copy.conf, which includes mplrc.conf- but mplrc.conf does not exist here are the contents of mplrc2_copy.conf, as loaded # A hierarchical configuration include = 'mplrc.conf' Backend now changed to: Cairo writing to file Here are the new contents of mplrc2_copy.conf: # A hierarchical configuration include = 'mplrc.conf' I might have expected to see the backend.use here maybe an error should be raised when a config file includes another config file that does not exist moving mplrc.conf.off to mplrc.conf, deleting mplrc2_copy.conf --------------------------------------------------------------------------------
On 7/24/07, Darren Dale <dd...@co...> wrote: > On Tuesday 24 July 2007 11:29:22 am Fernando Perez wrote: > > Bummer. It's nice to see that GUI for the whole of MPL running ;) > > I know, I really wanted to see this. Are you using traits from > http://code.enthought.com/enstaller/eggs/source/unstable? I think it has > something to do with my wx, maybe I am out of date, using wx-2.6.3.3: Mmh, dunno what the problem may be. I think I'm using a fairly old source install (of enthought), before eggs. All my machines are running Feisty. > > > > You can then save changes via > > > > > > > > mplconf2.write() > > > > > > The mpltest.py script expects there to be an mplrc2.conf file, but it > > > isnt in svn. So the script creates an empty mplrc2_copy.conf file, linked > > > with a default MPLConfig, but if I change some properties of > > > mplconf2.tconf, and then do mplconf2.write(), the mplrc2_copy.conf file > > > remains blank. > > > > Are you sure? I just ran the test removing the mplrc.conf file from > > my disk, and the mpnlrc2_copy.conf file is indeed created blank, but > > after editing the tconf object and calling write(), I *do* get the > > changes I make written to it. I can't reproduce your problem... > > I updated from svn. If mplrc.conf and mplrc2.conf are both present, I can run > mpltest.py, change mplconf2.tconf.backend.use, call mplconf2.write(), and get > a mplrc2_copy.conf that contains: > > # A hierarchical configuration > include = 'mplrc.conf' > [backend] > use = 'WxAgg' > > if I delete mplrc.conf, and repeat the exercise, I get a blank mplrc.conf, and > an mplrc2_copy.conf that contains: > > # A hierarchical configuration > include = 'mplrc.conf' > > If I delete mplrc2.conf, and I make sure that mplrc2_copy.conf has also been > deleted, the exercise yields a blank mplrc2_copy.conf. Just so we save time, would you mind just coding up the failure as a test? Something like (assuming it's inside mpltest.py, so the imports are done): def test(): ### if blah: raise Error('this is what I don't want') test() That way we know *exactly* what each other is trying to say. Maybe I'm just tired (I am), but I'm not quite understanding the problem you're seeing or the behavior you'd like/expect. > tconf2File works nicely. One comment, it is not indented like the files that > are created by tconf.write(), where sections are indented and subsections are > double-indented. Fixed to match the behavior of ConfigObj.write(), please update SVN. Cheers, f
T24gNy8xNi8wNywgRWRpbiBTYWxrb3ZpYyA8ZWRpbi5zYWxrb3ZpY0BnbWFpbC5jb20+IHdyb3Rl Ogo+IEhpIGFsbCwKPgo+IEEgbmV3IG1hdHBsb3RsaWItY2hlY2tpbnMgbWFpbGluZyBsaXN0IGhh cyBiZWVuIGNyZWF0ZWQgZm9yIFNWTiBjb21taXQKPiBub3RpZmljYXRpb24uCj4KPiBZb3UgY2Fu IHN1YnNjcmliZSB0byBpdCBieSB2aXNpdGluZzoKPiBodHRwczovL2xpc3RzLnNvdXJjZWZvcmdl Lm5ldC9saXN0cy9saXN0aW5mby9tYXRwbG90bGliLWNoZWNraW5zCgpGb2xsb3dpbmcgSm91bmkg Sy4gU2VwcMOkbmVuJ3Mgc3VnZ2VzdGlvbiwgSSBhc2tlZCB0aGUgR21hbmUgYWRtaW5zIHRvCmFk ZCB0aGUgY2hlY2tpbnMgbGlzdCB0byBHbWFuZSdzIGFyY2hpdmUuICBUaGV5IGFkZGVkIGl0IHVu ZGVyOgpnbWFuZS5jb21wLnB5dGhvbi5tYXRwbG90bGliLnNjbQoKU2VlOgpodHRwOi8vZGlyLmdt YW5lLm9yZy9nbWFuZS5jb21wLnB5dGhvbi5tYXRwbG90bGliLnNjbQpmb3IgbW9yZSBpbmZvLgoK RWRpbgo=
On Tuesday 24 July 2007 11:29:22 am Fernando Perez wrote: > On 7/24/07, Darren Dale <dd...@co...> wrote: > > On Tuesday 24 July 2007 5:20:40 am Fernando Perez wrote: > > > Hi all, > > > > > > if anyone is still following, please update the tconfig work. Run > > > > > > ipython -wthread > > > %run mpltest.py > > > mplconf2.tconf.edit_traits() > > > > > > Edit to your heart's content. > > > > I can't get edit_traits() working on my machine, but I can do it with the > > command line. > > Bummer. It's nice to see that GUI for the whole of MPL running ;) I know, I really wanted to see this. Are you using traits from http://code.enthought.com/enstaller/eggs/source/unstable? I think it has something to do with my wx, maybe I am out of date, using wx-2.6.3.3: /usr/lib/python2.5/site-packages/enthought.traits.ui.wx-2.0b2.dev_r12984-py2.5.egg/enthought/traits/ui/wx/ui_panel.py in create_label(self, item, ui, desc, parent, sizer, suffix, pad_side) 1000 control.help = item.get_help( ui ) 1001 sizer.Add( control, 0, self.label_flags | wx.ALIGN_CENTER_VERTICAL | -> 1002 pad_side, self.label_pad ) 1003 if desc != '': 1004 control.SetToolTipString( 'Specifies ' + desc ) /usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx/_core.py in Add(*args, **kwargs) 11709 Appends a child item to the sizer. 11710 """ > 11711 return _core_.Sizer_Add(*args, **kwargs) 11712 11713 def Insert(*args, **kwargs): <type 'exceptions.TypeError'>: wx.Window, wx.Sizer, wx.Size, or (w,h) expected for item > > > You can then save changes via > > > > > > mplconf2.write() > > > > The mpltest.py script expects there to be an mplrc2.conf file, but it > > isnt in svn. So the script creates an empty mplrc2_copy.conf file, linked > > with a default MPLConfig, but if I change some properties of > > mplconf2.tconf, and then do mplconf2.write(), the mplrc2_copy.conf file > > remains blank. > > Are you sure? I just ran the test removing the mplrc.conf file from > my disk, and the mpnlrc2_copy.conf file is indeed created blank, but > after editing the tconf object and calling write(), I *do* get the > changes I make written to it. I can't reproduce your problem... I updated from svn. If mplrc.conf and mplrc2.conf are both present, I can run mpltest.py, change mplconf2.tconf.backend.use, call mplconf2.write(), and get a mplrc2_copy.conf that contains: # A hierarchical configuration include = 'mplrc.conf' [backend] use = 'WxAgg' if I delete mplrc.conf, and repeat the exercise, I get a blank mplrc.conf, and an mplrc2_copy.conf that contains: # A hierarchical configuration include = 'mplrc.conf' If I delete mplrc2.conf, and I make sure that mplrc2_copy.conf has also been deleted, the exercise yields a blank mplrc2_copy.conf. tconf2File works nicely. One comment, it is not indented like the files that are created by tconf.write(), where sections are indented and subsections are double-indented. > > If I copy mplrc.conf to mplrc2.conf, then I can run mpltest, change my > > tconf properties, call write(), and those changes do get updated in > > mplrc2_copy.conf. > > > > > ps - the auto-generated file now has all class docstrings as comments > > > as well as traits handlers info. It should be a pretty good start for > > > a manually tweaked one. > > > > I have not been able to auto-generate a default file. As above, the file > > is blank after writing. > > How are you trying to generate it? Does the printout on-screen at > least write a full config for you? It does. I was creating a RecursiveConfigManager with a string pointing to a file that does not exist, and then calling that manager's write() method. Darren
On Tuesday 24 July 2007 12:05:15 pm Darren Dale wrote: > On Tuesday 24 July 2007 9:38:43 am Nils Wagner wrote: > > Hi all, > > > > Is there a way to suppress the warning > > > > /usr/local/lib64/python2.5/site-packages/matplotlib/texmanager.py:137: > > UserWarning: No LaTeX-compatible font found for the sans-serif font > > family in rcParams. Using default. > > warnings.warn('No LaTeX-compatible font found for the %s font family > > in rcParams. Using default.' % ff) > > I'm working on it... Its fixed in svn 3608.
On Tuesday 24 July 2007 9:38:43 am Nils Wagner wrote: > Hi all, > > Is there a way to suppress the warning > > /usr/local/lib64/python2.5/site-packages/matplotlib/texmanager.py:137: > UserWarning: No LaTeX-compatible font found for the sans-serif font > family in rcParams. Using default. > warnings.warn('No LaTeX-compatible font found for the %s font family > in rcParams. Using default.' % ff) I'm working on it...
On Tue, Jul 24, 2007 at 10:31:05AM -0500, Ken McIvor wrote: > In retrospect, I should've been clearer about my objection to using > traits in mpl1. I don't have any problem with enthought.traits in an > abstract sense -- it seems like an excellent solution to the problems > of attribute validation and change notification. My concerns regard > building a backend rendering system that uses change notifications to > maintain graphics state. I believe this approach makes the rendering > system harder to understand and optimize. AFAIK chaco is based on this approach. It makes a very nice API to use in interactive programs. As far as understanding and optimizing it would be nice to see if Peter Wang has something to say about this. Gaël
On Jul 23, 2007, at 7:18 PM, Peter Wang wrote: > On Jul 19, 2007, at 10:42 PM, Ken McIvor wrote: >> >> Code readability is also a concern to me -- the experience of >> reading mpl1.py suggests to me that newcomers might find traits a >> bit too "voodoo". I'm confident that the same thing could be >> achieved using Python properties to validate >> attributes. > > This is a true statement. In fact, the first version of traits > basically used properties to implement a lot of the validation and > notification. Eventually for power and speed, we moved to using a > metaclass with a C extension. > > I think the code readability question comes down to "is it easier for > someone to learn some basic things about traits, or is it easier for > them to decipher the massive jumble of property setters and getters > I've wired up"? I think that the amount of duplicated code that has > to written using simple python properties is non-trivial. In retrospect, I should've been clearer about my objection to using traits in mpl1. I don't have any problem with enthought.traits in an abstract sense -- it seems like an excellent solution to the problems of attribute validation and change notification. My concerns regard building a backend rendering system that uses change notifications to maintain graphics state. I believe this approach makes the rendering system harder to understand and optimize. Since my original comment about traits I have been working hard to put my money where my mouth is. Attached is an experimental rendering system with an alternative transform architecture that does not require attribute change notification. Please let me know what you think, everybody. Ken
On 7/24/07, Darren Dale <dd...@co...> wrote: > On Tuesday 24 July 2007 7:57:37 am John Hunter wrote: > > On 7/24/07, Fernando Perez <fpe...@gm...> wrote: > > > Hi all, > > > > > > if anyone is still following, please update the tconfig work. Run > > > > > > ipython -wthread > > > %run mpltest.py > > > mplconf2.tconf.edit_traits() > > > > > > Edit to your heart's content. > > > > I am not running in wthred, but I think there may be an import problem > > somewhere > > Line 347 in tconfig.py, change TraitError to T.TraitError Fixed in SVN, sorry. That's why the last ToDo item on this before considering it really semi-done is to turn the test scripts into real doc/unit tests that also exercise the exception-generation codepaths. Otherwise crap like this creeps in... Cheers, f
On 7/24/07, Darren Dale <dd...@co...> wrote: > On Tuesday 24 July 2007 5:20:40 am Fernando Perez wrote: > > Hi all, > > > > if anyone is still following, please update the tconfig work. Run > > > > ipython -wthread > > %run mpltest.py > > mplconf2.tconf.edit_traits() > > > > Edit to your heart's content. > > I can't get edit_traits() working on my machine, but I can do it with the > command line. Bummer. It's nice to see that GUI for the whole of MPL running ;) > > You can then save changes via > > > > mplconf2.write() > > The mpltest.py script expects there to be an mplrc2.conf file, but it isnt in > svn. So the script creates an empty mplrc2_copy.conf file, linked with a > default MPLConfig, but if I change some properties of mplconf2.tconf, and > then do mplconf2.write(), the mplrc2_copy.conf file remains blank. Are you sure? I just ran the test removing the mplrc.conf file from my disk, and the mpnlrc2_copy.conf file is indeed created blank, but after editing the tconf object and calling write(), I *do* get the changes I make written to it. I can't reproduce your problem... > If I copy mplrc.conf to mplrc2.conf, then I can run mpltest, change my tconf > properties, call write(), and those changes do get updated in > mplrc2_copy.conf. > > > ps - the auto-generated file now has all class docstrings as comments > > as well as traits handlers info. It should be a pretty good start for > > a manually tweaked one. > > I have not been able to auto-generate a default file. As above, the file is > blank after writing. How are you trying to generate it? Does the printout on-screen at least write a full config for you? Please update and try again, I added a little utility called tconf2File() to wrap this writing process; there's a small subtlety that I might not have been clear about before (one has to write the str() form of the tconf object to get the class docstring extraction). > > > pps - I'm done with this, for a while. I've sunk *way* too much time into > > it. > > Thank you Fernando. I'll have a look at the issues I reported when I get a > chance. Thanks. Cheers, f
Replying to this, even though I replied to a later message to enthought-dev, since this one is also cc'd to matplotlib-devel.... Darren Dale wrote: > On Sunday 22 July 2007 02:10:50 pm John Hunter wrote: > >> On 7/22/07, Dave Peterson <dpe...@en...> wrote: >> >>> Just uploaded a new source tarball that I believe should have this fixed >>> so that you don't need to install enthought.resource. Basically, I >>> >> Bingo, I am now getting a working install with >> >> sudo easy_install -f >> http://code.enthought.com/enstaller/eggs/source/unstable >> "enthought.traits < 3.0a" >> >> which brings in only etsconfig, util and traits. Thanks for tracking this >> down. >> > > I just ran that command myself (9:45 EST, July 23), and it installed: > > enthought.debug-2.0b2.dev_r12984-py2.5.egg/ > enthought.developer-2.0b2.dev_r12984-py2.5.egg/ > enthought.envisage-2.0b2.dev_r12984-py2.5.egg/ > enthought.etsconfig-2.0b1.dev_r12883-py2.5.egg/ > enthought.help-2.0b2.dev_r12984-py2.5.egg/ > enthought.io-2.0b1.dev_r12810-py2.5.egg/ > enthought.logger-2.0b2.dev_r12984-py2.5.egg/ > enthought.naming-2.0b2.dev_r12810-py2.5.egg/ > enthought.plugins.text_editor-2.0b2.dev_r12984-py2.5.egg/ > enthought.pyface-2.0b2.dev_r12984-py2.5.egg/ > enthought.resource-2.0b1.dev_r12810-py2.5.egg/ > enthought.sweet_pickle-2.0b2.dev_r12810-py2.5.egg/ > enthought.traits-2.0b2.dev_r12984-py2.5-linux-x86_64.egg/ > enthought.traits.ui.wx-2.0b2.dev_r12984-py2.5.egg/ > enthought.type_manager-2.0b1.dev_r12810-py2.5.egg/ > enthought.units-2.0b2.dev_r12984-py2.5.egg/ > enthought.util-2.0b2.dev_r12981-py2.5.egg/ > :-( I validated that this is indeed the current state of things as a result of my adding in extras to the dependencies that previously existed. Looks like we'll have to delay our release to spend more time minimizing these dependencies. -- Dave
Hi all, Is there a way to suppress the warning /usr/local/lib64/python2.5/site-packages/matplotlib/texmanager.py:137: UserWarning: No LaTeX-compatible font found for the sans-serif font family in rcParams. Using default. warnings.warn('No LaTeX-compatible font found for the %s font family in rcParams. Using default.' % ff) Nils
On Tuesday 24 July 2007 7:57:37 am John Hunter wrote: > On 7/24/07, Fernando Perez <fpe...@gm...> wrote: > > Hi all, > > > > if anyone is still following, please update the tconfig work. Run > > > > ipython -wthread > > %run mpltest.py > > mplconf2.tconf.edit_traits() > > > > Edit to your heart's content. > > I am not running in wthred, but I think there may be an import problem > somewhere Line 347 in tconfig.py, change TraitError to T.TraitError
On Tuesday 24 July 2007 5:20:40 am Fernando Perez wrote: > Hi all, > > if anyone is still following, please update the tconfig work. Run > > ipython -wthread > %run mpltest.py > mplconf2.tconf.edit_traits() > > Edit to your heart's content. I can't get edit_traits() working on my machine, but I can do it with the command line. > You can then save changes via > > mplconf2.write() The mpltest.py script expects there to be an mplrc2.conf file, but it isnt in svn. So the script creates an empty mplrc2_copy.conf file, linked with a default MPLConfig, but if I change some properties of mplconf2.tconf, and then do mplconf2.write(), the mplrc2_copy.conf file remains blank. If I copy mplrc.conf to mplrc2.conf, then I can run mpltest, change my tconf properties, call write(), and those changes do get updated in mplrc2_copy.conf. > ps - the auto-generated file now has all class docstrings as comments > as well as traits handlers info. It should be a pretty good start for > a manually tweaked one. I have not been able to auto-generate a default file. As above, the file is blank after writing. > pps - I'm done with this, for a while. I've sunk *way* too much time into > it. Thank you Fernando. I'll have a look at the issues I reported when I get a chance. Darren
On 7/24/07, Fernando Perez <fpe...@gm...> wrote: > Hi all, > > if anyone is still following, please update the tconfig work. Run > > ipython -wthread > %run mpltest.py > mplconf2.tconf.edit_traits() > > Edit to your heart's content. I am not running in wthred, but I think there may be an import problem somewhere In [3]: run mpltest.py --------------------------------------------------------------------------- NameError Traceback (most recent call last) /Users/jdhunter/tmp/sandbox/tconfig/mpltest.py in <module>() 10 11 mconf = 'mplrc.conf' ---> 12 mplconf = RecursiveConfigManager(MPLConfig, mconf, filePriority=True) 13 mplconf.tconf.backend.use = 'Qt4Agg' 14 mplconf.write() /Users/jdhunter/tmp/sandbox/tconfig/tconfig.py in __init__(self, configClass, configFilename, filePriority) 442 443 if filePriority: --> 444 self.tconf = configClass(self.fconfCombined,monitor=monitor) 445 else: 446 # Push defaults onto file object /Users/jdhunter/tmp/sandbox/tconfig/tconfig.py in __init__(self, config, parent, monitor) 345 getattr(self,k) 346 scal = getattr(self,k) --> 347 except TraitError,e: 348 t = self.__class_traits__[k] 349 msg = "Bad key,value pair given: %s -> %s\n" % (k,config[k]) NameError: global name 'TraitError' is not defined WARNING: Failure executing file: <mpltest.py> > pps - I'm done with this, for a while. I've sunk *way* too much time into it. We've heard that before :-)
Hi all, if anyone is still following, please update the tconfig work. Run ipython -wthread %run mpltest.py mplconf2.tconf.edit_traits() Edit to your heart's content. You can then save changes via mplconf2.write() Cheers, f ps - the auto-generated file now has all class docstrings as comments as well as traits handlers info. It should be a pretty good start for a manually tweaked one. pps - I'm done with this, for a while. I've sunk *way* too much time into it.
On 7/21/07, Darren Dale <dd...@co...> wrote: > On Saturday 21 July 2007 3:12:44 pm Fernando Perez wrote: > > On 7/21/07, Darren Dale <dd...@co...> 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! You may want to update before touching the code further. I moved some (not all, I didn't finish it and only meant to do enough to illustrate) of the comments you had in mpl.conf into the class docstrings. The TConfig __repr__ method now automatically adds these (as comments), so that auto-generated config files, if done purely from the TConfig class description, are still readable and possibly even useful. You can run mpltest.py to see what I mean, I made it just print out a purely default config at the end. Cheers, f
On Jul 19, 2007, at 10:42 PM, Ken McIvor wrote: >> = Z-ordering, containers, etc = >> >> Peter has been doing a lot of nice work on z-order and layers for >> chaco, stuff that looks really useful for picking, interaction, >> etc... >> We should look at this approach, and think carefully about how this >> should be handled. > > Is there somewhere in particular that I can look to see what > Peter's been working on? Enthought's svn repositories? I would recommend grabbing the eggs: https://svn.enthought.com/enthought/wiki/InstallWithEggs After installing the eggs, you can grab the chaco2 examples from SVN: svn co https://svn.enthought.com/svn/enthought/branches/ enthought.chaco2_2.0/examples Let me know if you have any problems! >> = Traits = >> I think we should make a major committment to traits and use them >> from >> the ground up. Even without the UI stuff, they add plenty to make >> them worthwhile, especially the validation and notification features. > > I hate to be the first one to disagree, but here goes: traits give > me the heebie-jeebies. I agree that matplotlib 1.0/2.0 needs to > validate all user-settable parameters. However, I'm concerned > about the development overhead that might result from making traits > as a core dependency. Code readability is also a concern to me -- > the experience of reading mpl1.py suggests to me that newcomers > might find traits a bit too "voodoo". I'm confident that the same > thing could be achieved using Python properties to validate > attributes. This is a true statement. In fact, the first version of traits basically used properties to implement a lot of the validation and notification. Eventually for power and speed, we moved to using a metaclass with a C extension. I think the code readability question comes down to "is it easier for someone to learn some basic things about traits, or is it easier for them to decipher the massive jumble of property setters and getters I've wired up"? I think that the amount of duplicated code that has to written using simple python properties is non-trivial. Of course, this being Python, people are going to be tempted to write some code to generate code or at least do some simple metaprogramming when they are faced with writing their 50th setter/getter. This then leads to the problem of documenting and testing the code-generating functions, and newcomers will have to learn about those and what they mean and what their side effects are. With traits, there is at least a well- tested and documented design that has been through the ringer a few times. > Change notification is another matter, granted, but I think that a > major rewrite will provide the opportunity to better design for > those situations. I actually think that change notification, more so than validation, is the killer feature of traits. After you write enough code with objects that communicate via notifications, you start really thinking of your running program as a little ecosystem of live objects, and it's an entirely different mental model for design and implementation. It's especially reinforced if you use Traits UI to bring up dialogs to interact with these live objects, or use IPython to start twiddling them as they're running, and you can see things change realtime, automagically. Just my (slight biased) $.02. :) -Peter