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


Groups > comp.lang.python > #75972

Re: How to draw a map using python

References <CAPLr9LHmOgFjma_qptZwpPBwoAxXOQ==q+8=cwu19Jv2xGMd6Q@mail.gmail.com> <CAPLr9LEeMhQOyEDhB9dhY=5Oojd_gAUKGKcg4+CioJd62kkc0g@mail.gmail.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2014-08-10 03:25 -0600
Subject Re: How to draw a map using python
Newsgroups comp.lang.python
Message-ID <mailman.12811.1407662799.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Sat, Aug 9, 2014 at 7:44 PM, Yuanchao Xu <xuyuanchao37@gmail.com> wrote:
> 1. I wonder in python, is there any more fast way to generate this kind of
> map, as a whole, not a series of shapes, i think that would be faster??

You mean like collecting all the shapes into a single sparse array and
passing the single array to contourf? Why would that be faster?

> 2. I have tried using contourf, as below, but it says "out of bounds for
> axis 1", but actually, I printed X,Y and cordi, they have the same shape,
> why still out of bounds?

I don't know. If you're going to ask about an error, it would be
helpful if you would include the full stack trace.

> 3. Some kind person has suggested me to use imshow to plot. I checked the
> explanation of imshow, it deals more about images not plots, and it needs a
> 3D array to plot, in which for each pixel it needs 3 values to show the
> color. I also tried, not so acceptable.

According to the documentation, it will also accept an MxN array of
greyscale or colormapped data.

> The interfaces of each color are so
> vague, and besides, when the data is large, it just failed to present. So,
> if I use imshow, could I have some way to avoid those two problems?

Failed how? As posed, this question is too vague to answer.

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


Thread

Re: How to draw a map using python Ian Kelly <ian.g.kelly@gmail.com> - 2014-08-10 03:25 -0600

csiph-web