I got data and showed it as a graph with matplotlib. and I reduced noise and under is the pictures of them.
and now I want to know the gradient of each points, so I tried to do differential in my graph.
but when I found about that, I just got information of how to do that when you have the equation of the graph.
maybe this one can be work(code under), but how can I got the value of f(x+h) and f(x-h)?
def numerical_diff(f, x):
h = 1e-4
return (f(x+h) - f(x-h)) / (2*h)
sorry for poor English and thank you for reading. I'll wait for your answer. help me pls

