I have a 1D array and a 3D array, and I would like to plot the 1D array vs only axis of the 3D matrix array. How do I extract only the first axis of the 3D matrix array? Because when I try to plot, I get this error:
x and y can be no greater than 2-D, but have shapes (710,) and (710, 81, 320)
My 1D array has length of 710, and I want to only plot the first axis with size of 710 for the 3D array. I tried doing:
plt.plot(time[:,None,None], tapered_sla)
plt.show()
where tapered_sla has the size of (710, 81, 320) and time has size of 710. but I still get the same error. Thank you!
Extra information:
The tapered SLA data looks like this:
print(sla_standard.shape)
print(sla_standard[40:42,40:42,40:42])
printed output:
sla_tapered shape = (710, 81, 320)
slice of sla_tapered data:
[[[-1.4175964 -1.12476448]
[-0.50547525 -0.80468703]]
[[-1.49470568 -1.13740495]
[-0.60470263 -0.86442081]]]