Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am fitting a theoretical equation for a complicated curve to some experimentally measured data. As you might be aware, algorithmically quantifying 'goodness of fit' for a complicated curve is something of a dark art...

I want to load the experimental data and display it in a graph, and then over the top have a manipulable plot of the generated curve superimposed, so that I can tweak the parameters by eye until the fit looks good.

I can plot the measured data, and I can plot the manipulable curve from theory, but I need them to be plotted on top of each other!

I'm having trouble getting it to show the two graphs at once though... is it possible?

Many thanks, Ben

share|improve this question
check out Show – Pinguin Dirk Sep 2 '13 at 13:17
Manipulate[ Show[ Plot[...], ListPlot[...]], {...}]. This question has been asked many times, and of course is a duplicate. – Artes Sep 2 '13 at 13:20
Plot[ <<>>, Epilog -> Points@expdata is a good way too. – Kuba Sep 2 '13 at 13:21
up vote 2 down vote accepted

Show can help you, as in this example:

preMadePlot = Plot[Sin[x], {x, 0, 2 Pi}]
  Plot[Sin[p x], {x, 0, 2 Pi}]
  ], {p, 1, 10}]
share|improve this answer
Thank you very much everyone! I was very close but misusing Show. Cheers! – Ben Sep 2 '13 at 13:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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