1
$\begingroup$

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

$\endgroup$
4
  • $\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$ 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
6
$\begingroup$

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.

Example:

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]}]
$\endgroup$

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