|
From: Jeff W. <js...@fa...> - 2013-07-05 16:21:43
|
> kmanross <mailto:kev...@gm...> > July 2, 2013 12:42 PM > Greetings! > > Relative newbie here. > > I'm trying to plot wind vectors using basemap quiver and to fit my ortho > projection. This is essentially a hack of Jeff Whitaker's animate.py found > at > > https://github.com/matplotlib/basemap/blob/master/examples/animate.py > > The data source I'm connecting to, however, has the latitudes in > decreasing > order, so I get the "lats and lons must be in increasing order!" exception > when trying to use the transform_vector method which seems to be > required to > fit the vectors to the projection. (ugliness occurs when failing to > transform) > > What would be the best way to transform latitudes (to increasing) as > needed > by transform_vector, while also accounting for the data order of my u > and v > grids? > > -kevin. > Kevin: Just flip the data around. lats_flipped = lats[::-1,:] data_flipeed = data[::-1,:] # assuming 2d array shape (nlats,nlons) -Jeff > > > -- > View this message in context: > http://matplotlib.1069221.n5.nabble.com/Basemap-transform-vector-for-decreasing-latitudes-tp41375.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > ------------------------------------------------------------------------ |