i apologize in advance for not being very precise, as a i dont know the mathematical expression for what i want.
i am using matplotlib to analyze a large dataset. What i have now is a distribution of x,y points. I want to find out the cases in which the x values of my function are the same, but y differs the greatest. So if i plot it, one part of the cases is at the top of my graph, the other is the botton of the graph.
So how do i get the points(x,y), (x,y’) where f(x)=y and f(x)=y’ and y-y’=max ?
cheers
Not sure if I understand correctly but here is a raw solution which you could adapt:
This should print for each distinct x the points which have the max difference on y. You can adapt it to your requirements.