From: Michael R. <raw...@ya...> - 2011-04-20 16:37:46
|
These commands plot points on a map in my code using python, matplotlib, and basemap. Thanks to Ian and Glenn for their assistance. Turns out lat, lon needed to be transformed into Lambert's coordinate space upon which the rest of the map is based. If anyone knows of a more elegant way to work on the entire array, rather than each point, I'll give it a shot. Mike data = csv2rec('file2.txt',delimiter=',',names=['lat','lon']) for i in range(len(data)): x,y=m(data['lon'][i],data['lat'][i]) # Translate to basemap's (Lambert) coordinate space plot(x,y,color='black',marker='.',markersize=6.0) |