I need to use Manipulate[] with many controls, because I have around 40 parameters which I want to be able to alter. Since the number is too large, I want to split these controls into multiple columns, and it would be even better if I can add "Delimiter" within the each columns, so that I can further group the parameters.
I found Grid[] may be needed here, however, I have to convert each line into the form of "Control[{{},}]", I wanted to use Map to do this in batch, but somehow the function will return the correct result only when I run the code for the first time, after that, the variables will be assigned to a specific value, so that it can no longer generate a control any longer.
The attached sample code and figures are attached; the third line will ouput the same figure as the second line, if excuted for the first time
My question is: how to conviently realize the desired grouping of controls into different columns and then subgroups? For example, if I already have the first Manipulate[] function with several Delimiter, how do I conveniently convert the controls into multiple columns?
Manipulate[
Plot[a*x^3 + b*x^2 + c*x + d, {x, -4, 4}], {{a, 1, "a"}, 0,
3}, {{b, 1, "b"}, 0, 3}, Delimiter, {{e, 2, "e"}, 0,
5}, Delimiter, {{c, 1, "c"}, 0, 4}, {{d, 0, "d"}, 0, 2}]
Manipulate[Plot[a*x^3 + b*x^2 + c*x + d, {x, -4, 4}],
Grid[{{Control[{{a, 1, "a"}, 0, 3}], Control[{{b, 1, "b"}, 0, 3}],
Control[{{e, 2, "e"}, 0, 5}], Control[{{c, 1, "c"}, 0, 4}],
Spacer[20], Control[{{d, 0, "d"}, 0, 2}]}},
Dividers -> {All, All}],
ControlPlacement -> {Left, Left, Left, Left}]
Manipulate[Plot[a*x^3 + b*x^2 + c*x + d, {x, -4, 4}],
Grid[{Map[
Control, {{{a, 1, "a"}, 0, 3}, {{b, 1, "b"}, 0, 3}, {{e, 2, "e"},
0, 5}, {{c, 1, "c"}, 0, 4}, {{d, 0, "d"}, 0, 2}}]},
Dividers -> {All, All}],
ControlPlacement -> {Left, Left, Left, Left}]
NMinimize
to reduce the problem-space? Also, are all params continuous or do some have discrete values, such true/false states? $\endgroup$DynamicModule
directly.Manipulate
saves the programmer effort by automatically constructing, linking, and laying out controls. But when it does not automatically do what you want, the savings are quickly spent trying to getManipulate
to do it just right. $\endgroup$