MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Plot in Background of Manipulate

The following is a solution using the Presentations package. I hardly ever
use Manipulate to make dynamic displays. It is too baroque and it is much
easier to format and construct a presentation directly. You did not give
actual information about his data and model so here I have used a rather
simple example of matching a variable Sin curve to one that is randomly


 {amplitude = 1, phase = 0,
  ampexp = RandomReal[{-5, 5}], phaseexp = RandomReal[{0, 2 \[Pi]}]},
   phrase["Amplitude: ", Slider[Dynamic[amplitude], {0, 4}],
    Spacer[10], InputField[Dynamic[amplitude], FieldSize -> {5, 1}]],
   phrase["Phase: ", Slider[Dynamic[phase], {0, 2 \[Pi]}],
    Spacer[10], InputField[Dynamic[phase], FieldSize -> {5, 1}]],
    {(* Experimental curve *)
     Gray, Draw[ampexp Sin[t + phaseexp], {t, 0, 2 \[Pi]}],
     (* Adjustable theoretical curve *)
     Dynamic@Draw[amplitude Sin[t + phase], {t, 0, 2 \[Pi]}]},
    AspectRatio -> 1,
    PlotRange -> {{-.1, 2 \[Pi] + .1}, {-6.1, 6.1}},
    Frame -> True,
    ImageSize -> 400]
   ](* pagelet *),
  Style["Dynamic Matching of Experimental Curve", 16]
  ](* panelpage *)

The gray curve is the hypothetical experimental curve, generated randomly
each time the input is evaluated. The sliders can be used to adjust the
black theoretical curve to the experimental curve.

Peter Lindsay at the Mathematical Institute in the University of St Andrews
[ ] has kindly undertaken to maintain an archive that
provides downloadable notebooks and PDF files for various Presentations
solutions that have appeared on MathGroup. 

David Park
djmpark at  

From: makn87 at [mailto:makn87 at] 

If someone could please help with the following, I would really

I am plotting of some logarithmic scattering curves based on
theoretical modes and am using manipulate to change a few paramaters.

In the same notebook, I have plotted experimental results using
ListLogLogPlot (on the exact same scale as I have using the manipulate

I would like to have my experimental plots, plotted in the background
of the manipulate window, so that I can adjust the parameters in
manipulate to the point that my theoretical curve matches my
experimental curve.

So far I have only been able to plot the experimental plots side by
side with the manipulate generated plots by simply making each plot an
elements of a list. How do I combine them?

  • Prev by Date: Re: How to import raw Comsol Multiphysics results into Mathematica
  • Next by Date: Re: Combining Plots with Different Ordinate Axes in Mathematica
  • Previous by thread: Experimental Mathematics Book
  • Next by thread: Re: Re: Plot in Background of Manipulate