Given a curve represented by two arrays with the elements not equally spaced:
x = np.array([ 1.54, 0.73, 0.45, 0.25, 0.18, 0.14, 0.11, 0.10, 0.11, 0.15, 0.37, 0.74 ])
y = np.array([-1., -0.60, -0.39, -0.19, -0.10, 0.01, 0.11, 0.21, 0.31, 0.41, 0.72, 1.])
And the graphic representation:
I want to find the coordinates xi
and yi
that correspond to the points at position 0.25
, 0.50
, 0.75
.
Is there a straingthforward way to find them in numpy
or in matplotlib
?