Thanks for the quick reply.
I may not have been totally clear on what I'm trying to save (or I totally
misunderstood what you were trying to say - which is certainly possible).
I'm not wanting to save the lat, lon pairs from the map projection. I'm
trying to save the lat, lon pairs of the contour. Using my original
example, if I'm plotting winds every 5 m/s, I'm wanting to pull off the lat,
lon pairs for the 5 m/s contours.
I'll check out the website and see if I find anything there.
-Patrick
On Sat, Aug 2, 2008 at 6:13 PM, Jeff Whitaker <[EMAIL PROTECTED]> wrote:
>
>> Patrick Marsh wrote:
>>
>>> Hi Everyone,
>>>
>>> First email here...
>>>
>>> I am plotting meteorological data using matplotlib and basemap - and can
>>> do this just fine. However, I would like to backout the coordinates being
>>> used for the contours that are plotted.
>>>
>>> For example, if I were to contour windspeed every 5 m/s and plot this
>>> (which I can do just fine), I would like to save a copy of the lat, lon
>>> pairs as a text file. However, I cannot for the life of me figure out how
>>> to do this. I have a feeling it is pretty simple and I'm just over looking
>>> something that can do this. Any help would be appreciated.
>>>
>>> Thanks,
>>>
>>> -Patrick Marsh
>>> Graduate Student
>>> School of Meteorology
>>> University of Oklahoma
>>>
>>
>> Patrick: contour and contourf return a ContourSet object.
>> ContourSet.collections is a matplotlib LineCollection (for contour) or a
>> PolyCollection (for contourf). You can retrieve the x,y (map projection)
>> coordinates from these, and transfer them back to lat/lon coordinates using
>> the Basemap instance via
>>
>> lons,lats = map(x,y,inverse=True) # map is a Basemap instance.
>>
>> See http://matplotlib.sourceforge.net/doc/html/api/collections_api.htmlfor
>> more info on matplotlib collection objects.
>>
>> HTH,
>> -Jeff
>>
>> ------------------------------------------------------------------------
>>>
>>> -------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>> challenge
>>> Build the coolest Linux based applications with Moblin SDK & win great
>>> prizes
>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>> world
>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>>
>>
>>
>> --
>> Jeffrey S. Whitaker Phone : (303)497-6313
>> NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
>> 325 Broadway Boulder, CO, USA 80305-3328
>>
>>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users