Message Boards Message Boards


Using Row and Column within Manipulate

Posted 10 years ago
2 Replies
3 Total Likes
I've looked at the advanced guide on this and have a small question.
In the specification of Manipulate there has to be an expression/s and there has to be a variable/s or Control/s. Either of these can be wrapped in  Row or Column - see my source code example.
However I am wondering if there is anyway to wrap both the expression and the variable part under  a single Column (say)? 
If I alter my source so the Row statement sits within the Column statement, rather than after, then the system complains of a missing variable section.
The reason I would like to do this is to have maximum control over both controls and plots using the Grid family.
Column[  {Plot[Sin[(a^b * x)], {x, 0, 6}],
      Plot[Sin[(a * x)], {x, 0, 6}],   }]
Row[{Control[ {a, 1, 10, ImageSize -> Tiny}],    Control[ {b, 1, 2, ImageSize -> Tiny}]}]
] (* anyway to get the Row statement within the Column staement???? *)
POSTED BY: William Stewart
2 Replies
Neat -thanks.
POSTED BY: William Stewart
If you want to use Manipulate, you could use something like the following (using ControlType -> None):

Column[{Dynamic@Plot[Sin[(a^b*x)], {x, 0, 6}],
   Dynamic@Plot[Sin[(a*x)], {x, 0, 6}],
   Row[{Control[{a, 1, 10, ImageSize -> Tiny}],
     Control[{b, 1, 2, ImageSize -> Tiny}]}]}], {{a, 1},
  ControlType -> None}, {{b, 1}, ControlType -> None}]

You can also use DynamicModule as well:
DynamicModule[{a, b},
Panel@Column[{Dynamic@Plot[Sin[(a^b*x)], {x, 0, 6}],
    Dynamic@Plot[Sin[(a*x)], {x, 0, 6}],
    Row[{Control[{a, 1, 10, ImageSize -> Tiny}],
      Control[{b, 1, 2, ImageSize -> Tiny}]}]}, Background -> White]]
POSTED BY: Jesus Hernandez
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract