0
$\begingroup$

I know that ListLinePlot allow to plot data, but I would like to compare my data with some analytic function in the same plot. Is it possible to listlineplot data and plot a function at the same time?

$\endgroup$
  • $\begingroup$ Try using Show. $\endgroup$ – bbgodfrey Mar 29 '15 at 22:18
  • $\begingroup$ Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. $\endgroup$ – bbgodfrey Mar 29 '15 at 22:18
0
$\begingroup$

Use Show[] to combine plots. E.g. Show[plot1, plot2].

$\endgroup$
3
$\begingroup$

A trivial way (many ways to do this...)

data = Range@100;
myF[x_] := x^1/2 + Sin[x];
ListLinePlot[{data, myF /@ data}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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