0

I have two arrays with the same dimension, lets name it x and y. When I plot them, plt.plot(x,y) the plot itself gives me back a continuous interpolation of my discrete data x and y.

How can I recover these interpolation from the plot?
Is there any other alternative to obtain more data in (x,y)?

Martin Evans
  • 45,791
  • 17
  • 81
  • 97
Jorge
  • 3
  • 1

1 Answers1

0

pyplot.plot() connects points on the graph with a line. That corresponds to linear interpolation if the plot is not logarithmic.

Among ready made functions, look at numpy.interp().

For theory, refer to https://en.wikipedia.org/wiki/Linear_interpolation

Dima Tisnek
  • 11,241
  • 4
  • 68
  • 120