0

As an exercise to explore the syntax of the various Manipulate Options I've written the following code that takes advantage of a number of these options.

Framed[Style[#, DefaultOptions -> {Panel -> {Background -> 
     RGBColor[0, .2, .7, .2]}, Frame -> True, 
     FrameStyle -> {Black, 10}, FrameMargins -> None}]] &

@Manipulate[Plot[b Sin[x (d + a x)/c], {x, -10, 10}, PlotRange -> {{-15, 15}, {-15, 15}}], {{ a, 0.001, Style["a", Large, Red]}, -12, 12, .5, Appearance -> {"Open", "DownArrow", Red},AnimationDirection -> ForwardBackward, ImageSize -> Medium }, {{b, 0.001, Style["b", Large, Green ]}, -10,10, .07, Appearance -> {"Open", "DownArrow", Green}, AnimationDirection -> ForwardBackward}, {{c, 0.005, Style["c", Large, Blue ]}, -10, 10, .04, Appearance -> {"Open", "DownArrow", Blue}, AnimationDirection -> ForwardBackward, Exclusions -> {0}}, {{ d, 0.001, Style["d", Large, Yellow]}, -5, 5, .1, Appearance -> {"Open", "DownArrow", Yellow}, AnimationDirection -> ForwardBackward}, FrameLabel -> Style["Plot b Sin(x(d+ax)/c)", Large, Bold, Black], AutoAction -> True, Deployed -> True, AutorunSequencing -> All, Method -> {"ContentAreaBackground" -> RGBColor[White]}]

However, there remain a number of things I still can't figure out from the documentation.

  1. How can one control the individual slider arrows, so that each can be made the same color as the slider labels (ie. colors assigned to "a","b","c","d")? They all remain blue in my code even though I try to set them individually using the Appearance option.

  2. How can one control the color and thickness of the slider bar/line? Depending on the panel background color it can be hard to see.

  3. Is it possible to change the color of the text, background, or framing of the input/display box to the left of the control box buttons individually for each control and if so, how?

  4. Is it possible to control the color of the buttons on the control panel so they complement the label colors?

  5. How can one force manipulate to start running each control, without first pressing the Play button?

  6. I've put a frame around the manipulate panel, but how do I eliminate the space between the black frame and the manipulate panel boundary?

  7. Since there is space to the right of the controls, how can one inset a panel that would permit a legend to be inserted for each of the 16 4-tuples to be assigned a unique color for the PlotStyle so that the color of the function displayed would reflect which of the 4 controls are active/inactive at any particular time? It is evident that one can create a variable and assign it as appropriate to PlotStyle, but I can't figure out where to put it or how to assign the variable to reflect the active/inactive state of a particular control.

Apologies for not breaking this up into 7 different questions, but it would seem it might be more helpful to others to see these all working within a single code segment.

Stuart Poss
  • 1,883
  • 9
  • 17
  • Use the option FrameMargins -> 0 in Frame, ie., Frame[Style[...],FrameMargins -> 0]&@...
  • – kglr Nov 09 '21 at 07:38
  • use the option AnimationRunning -> True in each control?
  • – kglr Nov 09 '21 at 07:40
  • Changing slider style
  • – Syed Nov 09 '21 at 07:46