I have this piece of code regarding the meshgrid function that I want to modify it's output:
x_list = list(range(5))
y_list = list(range(2))
X, Y = meshgrid(x_list, y_list)
which prints out:
X
array([[0, 1, 2, 3, 4],
[0, 1, 2, 3, 4]])
and
Y = array([[0, 0, 0, 0, 0],
[1, 1, 1, 1, 1]])
How can I modify my output to produce
X = array([0,0,0,0,0],
[1,1,1,1,1]
and
Y = array([0,1],
[0,1],
[0,1],
[0,1],
[0,1]]
instead? What I have in mind is something like this making X basically representing the x_axis values and Y the Y-axis values:
03 13 23 33 43
02 12 22 32 42
01 11 21 31 41
00 10 20 30 40
in the end I am doing something wrong I know it but I can't figure how to change the code in meshgrid in order to get me a normal x-y plane.