Dear Matplotlib-Users,
I am tryring to create a contour plot over a basemap.
My main problem is creating the array for the Z values as a basis for the
plt.contour command from a CSV file where latitude, longitude and value are
stored column-wise:
lat; lon; value
50; 10; 6
...
The data represents a regular spaced grid with a datapoint each 0.25 degrees.
I tried various possibilities but didn't have success:
1) following simpletest.py from the basemap examples:
X, Y = meshgrid(data[:,1], data[:,0])
Z = data[:,2]
m.contourf(x,y, Z)
=> Error: Z must be a 2D array
-> How do I get Z to be a 2D array?
2) using the griddata package
Here I was nearly without orientation how to call griddata correctly.
3) Using the python bindings of ogr
Any examples on this one?
>From my above demonstrated methods the following questions arrise:
What is the preferred way to plot
- Points stored in the above descripbed format (lat, lon, value)?
- Interpolate a grid of data points by using different interpolation
methods
like inverse distance wheighting, natural neighbor interpolation, etc. to get a
contour map?
Thanks in advance for your help & kind regards,
Timmie
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users