Message Boards Message Boards

0
|
7781 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Hide a control in a Manipulate?

Posted 9 years ago

Hello everyone,

Is it possible to hide a control in a Manipulate? I would like some controls to appear only if certain conditions are met.

Gregory

POSTED BY: Gregory Lypny
3 Replies
Posted 9 years ago

Thank you, Sam and Vitaliy,

Just what I needed!

Regards,

Gregory

POSTED BY: Gregory Lypny

Sam means this:

Manipulate[
Plot[Sin[x(1+a x)],{x,0,6}],
{a,0,2,ControlType->None}]

and more advanced:

Manipulate[
 ParametricPlot[{a1 Sin[n1 (x + p1)], a2 Cos[n2 (x + p2)]}, {x, 0, 
   20 Pi}, PlotRange -> 1.1, PerformanceGoal -> "Quality", 
  Axes -> axes, ImageSize -> size],
 OpenerView[{"Horizontal", 
   Column[{Control[{{n1, 1, "Frequency"}, 1, 4}], 
     Control[{{a1, 1, "Amplitude"}, 0, 1}], 
     Control[{{p1, 0, "Phase"}, 0, 2 Pi}]}, Right]}], 
 OpenerView[{"Vertical", 
   Column[{Control[{{n2, 5/4, "Frequency"}, 1, 4}], 
     Control[{{a2, 1, "Amplitude"}, 0, 1}], 
     Control[{{p2, 0, "Phase"}, 0, 2 Pi}]}, Right]}], 
 OpenerView[{"Plot options", 
   Row[{Control[{axes, {True, False}}], 
     Control[{{size, Medium}, {Small, Medium, Large}}]}, 
    Spacer[20]]}], ControlPlacement -> Top]
POSTED BY: Vitaliy Kaurov

ControlType->None

POSTED BY: S M Blinder
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract