Placing some controls above and some below plot

The code below is something I wrote quickly to simulate the problem I'm having with more complex code. I use Row (or Grid) to get the first 2 manipulate variables (a and b) on one line above the plot and I want the other 2 variables (c and d) in one line below the plot. I can get the controls where I want them without Row (or Grid) but then they appear in a column. Whenever I add Row all controls appear to have the same placement. I wasn't able to find any other posts that could help me with this problem.

Manipulate[
f = a*x^3 + b*x^2 + c*x + d;
Plot[f, {x, -4, 4}],
Row[{
Control[{{a, 1, "a"}, 0, 3, ControlPlacement -> Top}],
Control[{{b, 2, "b"}, 0, 5, ControlPlacement -> Top}]
}],
Row[{
Control[{{c, 1, "c"}, 0, 4, ControlPlacement -> Bottom}],
Control[{{d, 0, "d"}, 0, 2, ControlPlacement -> Bottom}]
}]
] • You can get more flexibility in positioning if you use a DynamicModule and build up the grid and control elements. – rm -rf Mar 6 '14 at 5:20

That is how you might do it within the framework of Manipulate:

Manipulate[
Plot[a*x^3 + b*x^2 + c*x + d, {x, -4, 4}],
Row[{Control[{{a, 1, "a"}, 0, 3}], Spacer, Control[{{b, 2, "b"}, 0, 5}]}],
Row[{Control[{{c, 1, "c"}, 0, 4}], Spacer, Control[{{d, 0, "d"}, 0, 2}]}],
ControlPlacement -> {Top, Top, Bottom, Bottom}
]

It looks as follows: Have fun.

• Thank you! I don't understand how I didn't even think of this. – baumannr Mar 7 '14 at 0:37
• This code is like a little miracle. – User18 Jun 20 '18 at 3:23
• However, there is something strange in the result! Here, controls a and b are at the bottom, whereas controls c and d are at the top! And after some trial and error I have found that ControlPlacement -> {Top, Bottom} works, where it seems that Top points to the first row and Bottom to the second. – User18 Jun 20 '18 at 13:39

Illustrating the advice of rm-rf:

DynamicModule[
{f, a, b, c, d},
f = a*x^3 + b*x^2 + c*x + d;
Column[
{Row[{"a  ", Slider[Dynamic[a], {0, 3}], "b  ",
Slider[Dynamic[b], {0, 3}]}, Frame -> True],
Dynamic@
Plot[f, {x, -4, 4}, ImageSize -> 400, PlotRange -> {-50, 50},
PlotStyle -> {Red, Thick},
PlotLabel ->
Row[{Style["f(x)=", 20], Style[TraditionalForm[f], 20]}]],
Row[{"c  " Slider[Dynamic[c], {0, 3}], "d  ",
Slider[Dynamic[d], {0, 3}]}, Frame -> True]}, Frame -> True
, Background -> LightYellow]]

I am sorry for not using some parameter ranges, but aim was illustrative: 