From: Michael T. <Mic...@s3...> - 2003-10-01 13:20:43
|
Hi, does anyone have an example of how to use matplotlib with glade2? Any idea when log scaling will be supported? Thanks, Michael The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s). Please direct any additional queries to: com...@s3.... Thank You. |
From: Michael T. <Mic...@s3...> - 2003-10-01 14:36:15
|
Hi, thanks for that example, I've been using the article from the Linux journal "A begnners guide to using pyGTK and Glade", http://www.linuxjournal.com/article.php?sid=6586, although I have been using python for a while, and I ahd to make a small change to /usr/lib/python2.2/site-packages/matplotlib/backends/backend_gtk.py try: import pygtk pygtk.require('2.0') except: pass I'm running redhat 8.0 and have these versions of pygtk installed. [root@arne root]# rpm -qa | grep pygtk pygtk2-1.99.12-7 pygtk2-libglade-1.99.12-7 Thanks, Michael PS log scales by next week sounds great, take me at least that long to sort out the rest of the stuff I need. On Wed, 2003-10-01 at 14:07, John Hunter wrote: > >>>>> "Michael" == Michael Thompson <Mic...@s3...> writes: > > Michael> Hi, does anyone have an example of how to use matplotlib > Michael> with glade2? > > See the attached example. I've used matplotlib with glade in my own > work, but never distilled it down to a simple example, as I just did. > I'll add them to the examples in the distribution. Note, you must be > using matplotlib 0.29 for this example to work. You can certainly use > matplotlib in any version with glade, but this example uses the new > API, in which GTK is only one of several renderers. If you need to > use an earlier version of matplotlib, the only change is at the top, > in the way you import Figure, Subplot, etc... > > Michael> Any idea when log scaling will be supported? > > This is near the top of my todo list. I have been holding off on > releasing 0.3 until I get this done. So I'll try to get it done by > next week, time permitting! > > John Hunter > > Glade example: -- Michael Thompson RF IC Design Engineer Silicon & Software systems +353 1 291 1710 The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s). Please direct any additional queries to: com...@s3.... Thank You. |
From: John H. <jdh...@ac...> - 2003-10-01 14:49:47
|
>>>>> "Michael" == Michael Thompson <Mic...@s3...> writes: Michael> try: import pygtk pygtk.require('2.0') except: pass Michael> I'm running redhat 8.0 and have these versions of pygtk Michael> installed. Michael> [root@arne root]# rpm -qa | grep pygtk pygtk2-1.99.12-7 Michael> pygtk2-libglade-1.99.12-7 Thanks for the info. matplotlib officially requires pygtk-1.99.16 which is where the require('2.0') thing comes from, but this has caused a number of redhat users a lot of grief so I need to make the changes you suggest to backport to earlier versions. I'm curious to know if with these changes all of the demos run on the default RHL8 install. If you get a chance to run a number of them, let me know and I'll update the web page. John Hunter |
From: Michael T. <Mic...@s3...> - 2003-10-01 15:25:06
|
Hi, the following seem to work, arctest.py axes_demo.py stock_demo.py but all generate similar errors along the lines of michaelt@arne examples>python stock_demo.py Xlib: extension "RENDER" missing on display ":0.0". Warning: text label "0" is outside window extent Warning: text label "0.6" is outside window extent Warning: text label "1.2" is outside window extent Warning: text label "1.8" is outside window extent Warning: text label "2.4" is outside window extent Warning: text label "3" is outside window extent Warning: text label "Days" is outside window extent Warning: text label "0.79" is outside window extent Warning: text label "0.86" is outside window extent Warning: text label "0.93" is outside window extent Warning: text label "1" is outside window extent Warning: text label "1.07" is outside window extent Warning: text label "1.14" is outside window extent The color_demo.py fails to run at all with the end of the error message being. michaelt@arne examples>python color_demo.py "/usr/lib/python2.2/site-packages/matplotlib/backends/backend_gtk.py", line 41, in get_color color = self._cmap.alloc_color(int(r*65025),int(g*65025),int(b*65025)) TypeError: GdkColormap.alloc_color() argument 1 must be string, not int On Wed, 2003-10-01 at 14:54, John Hunter wrote: > >>>>> "Michael" == Michael Thompson <Mic...@s3...> writes: > Michael> try: import pygtk pygtk.require('2.0') except: pass > > Michael> I'm running redhat 8.0 and have these versions of pygtk > Michael> installed. > > Michael> [root@arne root]# rpm -qa | grep pygtk pygtk2-1.99.12-7 > Michael> pygtk2-libglade-1.99.12-7 > > Thanks for the info. matplotlib officially requires pygtk-1.99.16 > which is where the require('2.0') thing comes from, but this has > caused a number of redhat users a lot of grief so I need to make the > changes you suggest to backport to earlier versions. I'm curious to > know if with these changes all of the demos run on the default RHL8 > install. If you get a chance to run a number of them, let me know and > I'll update the web page. > > John Hunter -- Michael Thompson RF IC Design Engineer Silicon & Software systems +353 1 291 1710 The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s). Please direct any additional queries to: com...@s3.... Thank You. |
From: John H. <jdh...@ac...> - 2003-10-01 15:52:50
|
>>>>> "Michael" == Michael Thompson <Mic...@s3...> writes: Michael> Hi, the following seem to work, Michael> arctest.py axes_demo.py stock_demo.py Thanks for the info. I can't replicate the warnings on my system because I don't have the older pygtk installed, but if I an find an appropriate test machine I'll see if I can find the source. Michael> The color_demo.py fails to run at all with the end of the Michael> error message being. Oops, this was a bug introduced when I changed the color handling in the abstract drawing interface. In older versions of matplotlib, rgb tuples were specified as 0-255 ints, now they are 0-1 floats. It's now fixed in CVS. Thanks for catching it. John Hunter |