I plotted a graph numerically, so I don't have a definition of the plotted function. Now I want to plot the derivative of this graph. Is there any way to do it in Mathematica? I have the following plot

enter image description here


closed as off-topic by Dr. belisarius, Karsten 7., Öskå, Mark McClure, Yves Klett Dec 19 '14 at 16:39

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Dr. belisarius, Karsten 7., Öskå, Mark McClure
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ How did you generate the plot, from a list of points? $\endgroup$ – John McGee Dec 18 '14 at 17:34
  • $\begingroup$ @ John McGee yes you can say from order pairs $\endgroup$ – Usman Dec 18 '14 at 17:39
  • 2
    $\begingroup$ Have you seen Interpolation[]? $\endgroup$ – Dr. belisarius Dec 18 '14 at 17:42
  • $\begingroup$ This tutorial should contain all informations you'll need. $\endgroup$ – Karsten 7. Dec 18 '14 at 17:43

if I understand you correctly you have the plot not the data. you need to extract the data from the plot and then (as belisarius mentioned) use interpolation.


p = Plot[Sin[x], {x, 0, 2 \[Pi]}];
data = Cases[p, Line[{x__}] :> x, -1];
d = D[Interpolation[data][x], x];
Plot[d, {x, 1, 2 \[Pi]}]

Not the answer you're looking for? Browse other questions tagged or ask your own question.