2
$\begingroup$

I start with the very simple Manipulate of a Plot:

Manipulate[Plot[Sin[omega*x],{x,0,5*Pi}],{omega,0,3}]

I know how to customize a bit the slider, so as to have it labeled with the name of the parameter omega, on the left of the slider, in a larger font size:

Manipulate[ Plot[Sin[omega*x], {x, 0, 5*Pi}], {{omega, 0, Style["\[Omega]", 16]}, 0, 3, Appearance -> "Labeled"}]

However, this last modification shows, on the right of the slider, the current numerical value of the parameter omega too small, not corresponding to the FontSize 16 of the label omega itself, on the left of the slider. I would like something like (of course does not work):

Manipulate[ Plot[Sin[omega*x], {x, 0, 5*Pi}], {{omega, FontSize[0, 16], Style["\[Omega]", 16]}, 0, 3, Appearance -> "Labeled"}]

How can I change the font size of the current displayed value for the parameter on the slider???

Thanks

$\endgroup$
2
$\begingroup$

Try the option LabelStyle

Manipulate[Plot[Sin[omega*x], {x, 0, 5*Pi}], {{omega, 0, Style["\[Omega]", 25]},0, 3, Appearance -> "Labeled", LabelStyle -> (*Large *)   {Red, FontSize -> 25}   }]

enter image description here

$\endgroup$
  • $\begingroup$ Your first suggestion (with LabelStyle -> Large) worked, but the font size was way too large now... Your second suggestion (with FontSize->16) caused no change at all in the right hand side number of the slider: $\endgroup$ – Mauricio Calvao Jun 19 at 15:03
  • $\begingroup$ Did you try for example LabelStyle -> {Red, FontSize -> 25} See my edited answer! $\endgroup$ – Ulrich Neumann Jun 19 at 15:09
  • $\begingroup$ Excuse me: I got the syntax wrong for the second suggestion. I tried: Manipulate[ Plot[Sin[omegax], {x, 0, 5*Pi}], {{omega, 0, Style["[Omega]", 16]}, 0, 3, Appearance -> "Labeled", FontSize -> 16}] instead of the correct: Manipulate[ Plot[Sin[omegax], {x, 0, 5*Pi}], {{omega, 0, Style["[Omega]", 16]}, 0, 3, Appearance -> "Labeled", LabelStyle -> {FontSize -> 16}}] This last one does work. Thanks $\endgroup$ – Mauricio Calvao Jun 19 at 15:12
  • $\begingroup$ You're welcome! $\endgroup$ – Ulrich Neumann Jun 19 at 15:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.