Why dont anyone answer me???

atlest give me a hint...

Ok, so i want to use the my csv as input and then plot the contour. I have
the follwing code but gives

error:list object has no attribute reshape

is using list diffrent than using numpys loadtext and then into variables
???


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

portfolio = csv.reader(open("file.csv", "rb"))
portfolio_list = []
portfolio_list.extend(portfolio)
lats = []
lons = []
values=[]

for data in portfolio_list:
    lats.append(data[0])
    lons.append(data[1])
    values.append(data[2])
print lats
print lons


nlats = len(lats)
nlons = len(lons)

yre = lats.reshape(nlats,nlons)
xre = lons.reshape(nlats,nlons)
zre = values.reshape(nlats,nlons)
#### later in the defined map
CT = plt.contourf(xre, yre, zre, cmap=color_map)

cbar = plt.colorbar()


plt.show()

-- 
View this message in context: 
http://www.nabble.com/Colormap-using-%28UV%29coordinates-from-file-tp23572972p23583803.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