Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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

1 Answer 1

up vote 1 down vote accepted

Show can help you, as in this example:

preMadePlot = Plot[Sin[x], {x, 0, 2 Pi}]
Manipulate[Show[
  preMadePlot,
  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

 
discard

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.