On Mon, 6 Jan 2014 12:08:19 -0800 (PST), Isaac Won <winef...@gmail.com> wrote:
    dis1 = [[]]*1


    for c in range(0,275):
        dis1[0].append(dis[c])

So dis1 has 1 row in it. But contourf is expecting many rows, matching the length of lat. I'm guessing you have to fill in the others.

    cs = plt.contourf(lon,lat,dis1)


TypeError: Length of x must be number of columns in z, and
length of y must be number of rows.

That's only a tiny part of the error message. Please post the whole traceback. I made a guess here knowing nothing about these libraries you're using.

--
DaveA

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to