From: Bob Hanlon on

The controls do not all have to be in the same area.

f[a_, b_, x_] = (x - a) (x - b);

Manipulate[Plot[f[a, b, x], {x, -5, 5},
PlotRange -> {-25, 50},
Epilog -> {Red,
Line[{{x0, -25}, {x0, 50}}],
Line[{{-5, y0}, {5, y0}}]}],
{{a, 2}, -5, 5, .1,
Appearance -> "Labeled"},
{{b, -2}, -5, 5, .1,
Appearance -> "Labeled"},
{{x0, 0, "x"}, -5, 5, .1,
Appearance -> "Labeled"},
{{y0, 0, "y"}, -25, 50, 1,
Appearance -> "Labeled",
ControlType -> VerticalSlider},
ControlPlacement ->
{Top, Top, Bottom, Left}]


Bob Hanlon

---- "Nasser M. Abbasi" <nma(a)12000.org> wrote:

=============
Just a little bit of rambling on Manipulate:

Currently when writing a Manipulate, the control variables (slides, buttons,
etc...) go into one "area" on the Manipulate output "call it the control
variables area", and all the plots and graphics go into another "area" (call
it the output area).

Sometimes, it would be better to position a specific control next to the
plot itself that this control has a relation to. It makes the UI easier to
work with for the user to work with.

A simple example, suppose I want to have a 2 slides, one to adjust the
x-scale and the other to adjust the y-scale on a plot.

I'd like to be to locate the x-scale slider horizontally right there, below
the x-axis of the plot, and the y-slider vertically aligned next to the
y-axis of the plot, instead as the case now, where the 2 slides will go to
the "control area", and the plot goes to the Manipulate "output area".

The above is not an issue if one has one output (one plot or one graphic
object) as the output of the Manipulate, but if there are 3 or 4 plots, and
then I want to have some controls for one plot and another controls for
another plot, then I'd like to be able to position the controls close to the
plot itself that they affect.

One way to do something close to what I want is shown in the advanced
manipulate documentation, where it talks about
Lissajous figure, and placing dynamics plots on the control area itself.
This way I can have more control of having the control close to the plot.
But the plots are now located on the control area and not in the display
area.

But I feel there should be a more general approach to this whole issue? May
be future versions of Manipulate would have something to help with this? May
be a GridManipulate[] function?

--Nasser




--

Bob Hanlon