Plot surface from 3 1D arrays [duplicate]

2019-01-12 12:19发布

问题:

This question already has an answer here:

  • surface plots in matplotlib 7 answers

I wish to plot a surface using 3 1D arrays. To be more precise, I must plot the temperature along a rod over time. Is there a simple way to do this?

Given arrays and their dimensions:

T(n,1) temperature
x(n,1) distance
T(n,1) time

What I basically aim to create is something like this:

回答1:

Thank you, for your answers.After a couple of hours i figured it out. I had to save all temperatures over time in another matrix, 'meshgrid' x and t (whatever that is...) et voila!.