From: Greg N. <no...@uc...> - 2005-02-23 06:29:03
|
Ok, I was so rattled when I wrote the previous message that I forgot to ask my actual question: I was trying to change backends midstream because I was only getting b/w plots when I used pcolor--I couldn't change the colormap. At first I thought that this was because I was using the Postscript backend and for some reason it assumed I wanted b/w output for printing. After fooling around with some of the other imaging backends, I used one of the interactive ones (this is a pain b/c I'm running Python remotely and I'm sitting at the end of a slow internet link. Therefore interactive windows take forever to pop up. More on this later), and the plot was still b/w. After significant frustration, I realized that my problem was that I was specifying the color map as 'cm=' instead of 'cmap='; a reasonable guess since the rest of the line is 'cm.hot' The problem was that matplotlib silently ignored my misspecified argument. This is gripe #1: weak typing only works when using undefined variables bites you on the nose. Otherwise we're back to the bad old days of fortran, when misspelling a variable name silently defined a new variable. It would be nice if somewhere in the heirarchy of function calls within matplotlib someone checked to make sure there were no lonely, unused keyword arguments sloshing around. I realize that this is hard to do robustly and with any generality, but there's a lot at stake. Python would be unusable if use-before-definition didn't generate an exception. Gripe #2 is that it would be nice if the same word were abbreviated the same way everywhere. Ie, either cmap or cm, not both. Gripe #3 is related to interactive windows when Python and the X11 server are connected by a slow link. All of the interactive backends I've used for matplotlib look great, but render very slowly in this situation b/c they're sending all the pixel data. Since most plots consist of a few lines, a bit of text, and a few dots, it'd be nice if the windows rendered quickly over slow connections. For example, Gnuplot runs very well in this configuration. I realize that this doesn't invovle matplotlib per se, I just wanted to throw it out there as a concern. I apologize for the negative tone of this mail. Don't get me wrong--I use matplotlib and I like it b/c it's the best thing I've found. However, I just had one of those "GAAARGHGGHHHH!" moments and it's taking a little while to de-stress. Cheers, Greg |