El jue, 25-09-2008 a las 22:19 +0200, Oz Nahum escribió:
> >¿What's the meaning of that data arrange? I can't make any sense of
> >plotting a 2D scatter from a 3D array.
>
> when I wrote:
> head = [[0,0,10],
> [1,0,13],
> [2,0,11],
> [3,
>¿What's the meaning of that data arrange? I can't make any sense of
>plotting a 2D scatter from a 3D array.
when I wrote:
head = [[0,0,10],
[1,0,13],
[2,0,11],
[3,0,12],
[1,2,11]]
my meaning was to represent
Just give a look at zip(*head) and see that now it return two values so
you can't assign it to three variables.
¿What's the meaning of that data arrange? I can't make any sense of
plotting a 2D scatter from a 3D array.
Goyo
El jue, 25-09-2008 a las 15:15 +0200, Oz Nahum escribió:
> Hi,
> Thanks
Hi,
Thanks for your reply and appologies for my late response.
This indeed does the job. But after playing a little bit with the code, I
have discovered a few things:
first, I'd rather work with lists not tuples so I could actually change my
huge array of points.
second the array I described is kin
Try something like this:
import pylab as pl
head = ((0,0,10),
(1,0,13),
(2,0,11),
(3,0,12),
(1,2,11))
x, y, z = zip(*head)
xi, yi = pl.arange(0, 4, 0.1), pl.arange(0, 3, 0.1)
g = pl.griddata(x, y, z, xi, yi)
pl.scatter(x, y)