>¿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 point of intereset with x, y coordinates and the 3rd number was height for example.
I felt like I couldn't access the individual points easily, because their are located in on big list...
So I wanted to have the list broken into rows, and the each row represents a value on the y axis... like this:
head = [
[[0, 0, 10], [0, 0, 13]],
[[2, 0, 11], [3, 0, 12]],
But that's redundant I think now, after looking into the function zip.
Maybe I could write head in the following way:
# j = 0 1
head = [
[[ 0, 10], [ 1, 13]], # i =0
[[ 0, 11], [ 1, 12]], # i =1
But actually after understanding what zip does, I think I don't need it anyway...
Talking about this: can you give me an example of another use of zip ? not just zip(*head)
I did help(zip) but I could partially understand what it does. I learned more by doing:
x,y,z = zip(*head)
and then printing x,y,z individually.
Thanks for your help so far.