Re: Drawing shaded area depending on distance with latitude and altitude coordinate
Dave Angel
davea at davea.name
Mon Jan 6 17:46:52 EST 2014
On Mon, 6 Jan 2014 12:08:19 -0800 (PST), Isaac Won
<winefrog at 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
More information about the Python-list
mailing list