Re: [Matplotlib-users] Basemap help, imshow, transform_scaler

2007-11-01 Thread John
The default, TkAgg. I've tried the others as I have some strange behavior with TkAgg, but they don't work at all... In fact, I think I'll start another thread, because the problem I have is now predictable... I would be interested to see if there's a solution...

Re: [Matplotlib-users] Basemap help, imshow, transform_scaler

2007-11-01 Thread Eric Firing
John wrote: > Thanks Eric... > > Just a question, I've noticed that if I put enough resolution in lev_exp > (ie. lev_exp=arange(0,log10(z.max()),0.15) #or more is even nicer! Then > the file size gets quite large due to all the colors. Any suggestions? I > know its a separate issue... > > -

Re: [Matplotlib-users] Basemap help, imshow, transform_scaler

2007-11-01 Thread John
Thanks Eric... Just a question, I've noticed that if I put enough resolution in lev_exp (ie. lev_exp=arange(0,log10(z.max()),0.15) #or more is even nicer! Then the file size gets quite large due to all the colors. Any suggestions? I know its a separate issue... -john

Re: [Matplotlib-users] Basemap help, imshow, transform_scaler

2007-10-31 Thread Eric Firing
John, Attached is a script illustrating how to make contourf plots with a log colorscale. I made some improvements in svn, as noted in the script, but you can still do it with the regular mpl release. All of this should carry through to basemap with no changes in basemap. Eric John wrote:

Re: [Matplotlib-users] Basemap help, imshow, transform_scaler

2007-10-31 Thread Eric Firing
John, We actually have the facility for using a log color scale directly, including handling out-of-range values, but I confess I am having a little trouble with it. I can't pursue it right now, but probably can do so this evening. It looks like the problem is a bug, but I am not sure. Eric

Re: [Matplotlib-users] Basemap help, imshow, transform_scaler

2007-10-31 Thread Jeff Whitaker
John wrote: > Well, it seems like I'm making progress, but it's stll not the plot > I'm hoping to produce. Something seems strange. First, it does create > a contourf plot, but I really need to take log(zdata) and use imshow > (which seems to handly the INF issue, wheras contourf crashes). On >

Re: [Matplotlib-users] Basemap help, imshow, transform_scaler

2007-10-31 Thread John
Well, it seems like I'm making progress, but it's stll not the plot I'm hoping to produce. Something seems strange. First, it does create a contourf plot, but I really need to take log(zdata) and use imshow (which seems to handly the INF issue, wheras contourf crashes). On another issue though, onc

Re: [Matplotlib-users] Basemap help, imshow, transform_scaler

2007-10-31 Thread John
Hold on, see my errors, trying again - 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. Downloa

Re: [Matplotlib-users] Basemap help, imshow, transform_scaler

2007-10-31 Thread John
Shoot, still getting the error discussed above: ValueError: shape mismatch: objects cannot be broadcast to a single shapeFile "c:\07_jfb\Programming\Python\mod_flexpart\plotPickle.py", line 30, in fp_plot(z); File "c:\07_jfb\Programming\Python\mod_flexpart\plotflex.py", line 55, in fp_plot cs

Re: [Matplotlib-users] Basemap help, imshow, transform_scaler

2007-10-31 Thread Jeff Whitaker
John wrote: > No, it didn't get cut off, I just decided to move that section forward > before the code and forgot to delete that line ;) > > Okay, let's see... > > 1) Yes, I've left them in for the moment since I saw that they will be > ignored, and I'm playing with different projections... s

Re: [Matplotlib-users] Basemap help, imshow, transform_scaler

2007-10-31 Thread John
Also, I don't know if it's related, but I'm getting this Error / Warning: UnboundLocalError: local variable 'pylab' referenced before assignment Traceback: File "c:\Python25\lib\site-packages\matplotlib\toolkits\basemap\basemap.py", line 2232, in imshow ax = pylab.gca() As my script calls th

Re: [Matplotlib-users] Basemap help, imshow, transform_scaler

2007-10-31 Thread John
No, it didn't get cut off, I just decided to move that section forward before the code and forgot to delete that line ;) Okay, let's see... 1) Yes, I've left them in for the moment since I saw that they will be ignored, and I'm playing with different projections... seems it doesn't hurt. 2) Yes,

Re: [Matplotlib-users] Basemap help, imshow, transform_scaler

2007-10-31 Thread Jeff Whitaker
John wrote: > Jeff, > > Thanks for the quick reply, below is my plotting code. Here are the > answers to your question about my arrray: > > >>> type(Zdat); type(zdat) > > > >>> shape(Zdat); shape(zdat) > (180, 360) > (596, 596) > >>> shape(lons); shape(x) > (360,) > (596, 596) > >>> shape(lats

Re: [Matplotlib-users] Basemap help, imshow, transform_scaler

2007-10-31 Thread John
Jeff, Thanks for the quick reply, below is my plotting code. Here are the answers to your question about my arrray: >>> type(Zdat); type(zdat) >>> shape(Zdat); shape(zdat) (180, 360) (596, 596) >>> shape(lons); shape(x) (360,) (596, 596) >>> shape(lats); shape(y) (180,) (596, 596) I would like

Re: [Matplotlib-users] Basemap help, imshow, transform_scaler

2007-10-31 Thread Jeff Whitaker
John wrote: > Can anyone explain this?? > > >>> N.max(Zdat) #this is numpy.max function > 1302.73592859 > >>> zdat,x,y = > m.transform_scalar(Zdat,lons,lats,nx,ny,returnxy=True,order=0) > >>> N.max (zdat) > 0.0 > >>> > > In this case, Zdat is my original array sent to my plotting function. >

[Matplotlib-users] Basemap help, imshow, transform_scaler

2007-10-31 Thread John
Can anyone explain this?? >>> N.max(Zdat) #this is numpy.max function 1302.73592859 >>> zdat,x,y = m.transform_scalar (Zdat,lons,lats,nx,ny,returnxy=True,order=0) >>> N.max(zdat) 0.0 >>> In this case, Zdat is my original array sent to my plotting function. It seems to lose all it's data when I r