0

I plot(x,y) a chart, for which I want to find two things: - all values of x for which y>some specified value, - all values of y for which y>some specified value.

chart

How can I do it?

tesgoe
  • 1,012
  • 3
  • 10
  • 19

1 Answers1

1

Using numpy:

import numpy as np

x = np.linspace(0,25,101) #x: 101 values between 0 and 25
y = x**2/20 

x[y>30]  #filter output: [ 24.5 ,  24.75,  25.  ]  
y[y>30]  #filter output: [ 30.0125  ,  30.628125,  31.25    ]

This assumes that you have access to the values which generated the plot.

M.T
  • 4,917
  • 4
  • 33
  • 52