I've found numerous answers that will average all the Y values of a series of curves, and call that the average of all the plots.
However, I want a 2D average, in which a new X & Y value (not just Y value) is determined from some number of original X/Y plots.
Here's an example:
As you can see, the purple curve has x-coords that aren't present in the blue curve, so averaging the y-values won't work (at least not for the part of the curve I find most interesting - the end/top-right).
Now I fully realize that this is likely a rather complex situation, since the direction in which to find the midpoint changes continuously. (What's it called for 5 curves? Not just a simple midpoint any more.) But I'm assuming some brilliant mathematicians have, in times long past, pondered this very problem and presented some beautifully simple way to do this...
I'm looking for a Python answer, but a Matlab or similar answer would also be great, as I can just transcribe that into Python/Numpy etc. Also my actual situation does involve "averaging" 5-10 similarly-shaped curves.