From: John H. <jdh...@ac...> - 2004-12-23 15:02:51
|
>>>>> "John" == John Gill <jn...@eu...> writes: John> I'm having trouble getting the alpha keyword to do anything John> when I use the OO interface (as per gtk embeded example). I'm not sure about the exact status of alpha vis-a-vis alpha - perhaps Steve can clarify. a gdk.Color does not have and alpha channel, nor does a gdk.GC, but a gdk.Pixbuf does. Basically, alpha is (mostly) unsupported on the GTK backend (you can do alpha blending of images because antigrain handles images across backends). But you should probably be using the gtkagg backend, which has alpha support for all plot elements, and does a better job of anti-aliasing. In some measurements, eg animation, it is a little slower than the pure GTK backend, so you may want to do a little profiling. It will probably be faster than GTK for large collections, perhaps 2x or so, since it does the collection drawing in extension code and the other backends have a python implementation. John> Aside from this, I'd just like to say what a great package John> matplotlib is. I've been using it a lot the last week to John> plot maps -- first I started using pcolor to plot hurricane John> footprints (I'll see if I can get the OK to release some of John> the plots, pcolor produced some wonderful pictures with a John> few lines of code). if/when you have regularly spaced grids, imshow will likely be an order of magnitude faster than pcolor for large data sets, so keep it in mind.... John> Inspired by this I've also been plotting simple maps by John> creating collections of polygons (eg one polygon for each John> country in the world) + associating a value with each John> polygon. Again, great pictures in a few lines of code + John> using the collections the speed is pretty good, even with John> 3000+ polygons it was all pretty snappy. John> I'll see if I can get an example together -- to do this I'll John> need to get some un-restricted shape files, but I'll see John> what I can do. That would be great - I'll keep my eyes peeled... JDH |