Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #63363

Re: Drawing shaded area depending on distance with latitude and altitude coordinate

From Dave Angel <davea@davea.name>
Subject Re: Drawing shaded area depending on distance with latitude and altitude coordinate
Date 2014-01-06 17:46 -0500
References <7f58342b-9b75-4a2c-b98e-cc43a4bb05a6@googlegroups.com> <7f58342b-9b75-4a2c-b98e-cc43a4bb05a6@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.5081.1389048319.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Mon, 6 Jan 2014 12:08:19 -0800 (PST), Isaac Won 
<winefrog@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

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Drawing shaded area depending on distance with latitude and altitude coordinate Isaac Won <winefrog@gmail.com> - 2014-01-06 12:08 -0800
  Re: Drawing shaded area depending on distance with latitude and altitude coordinate Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-06 20:16 +0000
  Re: Drawing shaded area depending on distance with latitude and altitude
 coordinate Dave Angel <davea@davea.name> - 2014-01-06 17:46 -0500

csiph-web