This one is from Jeff here at the forum and it does work. But the smoothing
of the color values inbetween the countour is not so good. How to improve
that ?

Also,i am still searching for a load .csv example to use with pcolor or
countour.


from matplotlib.mlab import load
import matplotlib.pyplot as plt 
import numpy as np

data = load("C:/Users/Pontus/data.txt")
# need to know nlons and nlats beforehand!
nlons = 8; nlats = 25
X = data[0::nlats,0]
Y = data[0:nlats,1]
# data is in nlons,nlats order in file, need to transpose
Z = data[:,2].reshape(nlons,nlats).transpose()
X,Y = np.meshgrid(X,Y)
CS = plt.contourf(X,Y,Z,20)
plt.show()

-- 
View this message in context: 
http://www.nabble.com/Colormap-using-%28UV%29coordinates-from-file-tp23572972p23573711.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to