Ok, I upgraded to numpy 1.30 and the problem still showed up... Im still getting those strange diagonal line defects. (looks as if some of the edge arrow polygons are being clipped/drawn/closed improperly & thus 'dragged' across the plot area???)
I attached my x,y,u,v arrays... Here's my basemap setup... m=bm(projection='cyl',llcrnrlat=20,urcrnrlat=30,llcrnrlon=-100,urcrnrlon=-80 ,resolution='h') though it might not help much, here's the exact export from pygrads (ga.expr() exports from grads into a customized masked array in python) 'dirpw' is the grads variable being imported into mpl. U = ga.expr('(-1*sin(dirpw*3.1414/180))') V = ga.expr('(-1*cos(dirpw*3.1414/180))') X,Y=m(*np.meshgrid(U.grid.lon,U.grid.lat)) I then was also doing this to convert to simple ndarrays (a while back, I was recommended this method to solve a problem I was having with quiver performing really slowly when using those grads masked arrays as input) x,y,u,v = delete_masked_points(X.ravel(), Y.ravel(), U.ravel(), V.ravel()) Let me know if you need anything else... Thanks, P.R. -----Original Message----- From: Jeff Whitaker [mailto:jsw...@fastmail.fm] Sent: 2009-08-11 9:26 PM To: P.R. Cc: matplotlib-users@lists.sourceforge.net Subject: Re: [Matplotlib-users] problem with basemap/quiver with latest versions of basemap&mpl P.R. wrote: > Hi, > I just updated to the latest versions of mpl & basemap. > Im getting strange output when using the quiver function from basemap (see > attached image). > > I ran the quiver_demo scripts for both basemap & also mpl, and the output > looked normal. > > Im using pygrads, a python interface to GrADS, in order to generate my > X,Y,U,V input arrays for quiver. > I can provide these arrays if needed... > > The data imported using pygrads previously worked fine (prior to updating to > the new versions). > > Before I start diving into the pygrads code in order to troubleshoot, I > wanted to first check to see if this issue is a possible quiver bug in the > new version(s)... > > Or, were there any significant changes to the mpl/basemap code with respect > to how quiver works??? > > Here's the basic method Im using... > U = <my_pygrads_imported_U> > V = <my_pygrads_imported_V> > X,Y=m(*np.meshgrid(U.grid.lon,U.grid.lat)) > #x,y,u,v = delete_masked_points(X.ravel(), Y.ravel(), U.ravel(), V.ravel()) > cs2 = m.quiver(X,Y,U,V,*kwargs) > > again, this *used* to work fine, prior to the updates... > > Please help, > Thanks, > P.Romero > P.R.: I can't see anything wrong - you'd better post your data so we can try it. You might also try to upgrade to numpy 1.3.0, if you haven't already, I know there were some masked array changes between 1.2.1 and 1.3. -Jeff
xy_uv.npz
Description: Binary data
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users