Re: Showing the Current Value of a Slider in Manipulate
- To: mathgroup at smc.vnet.net
- Subject: [mg103520] Re: [mg103487] Showing the Current Value of a Slider in Manipulate
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Sat, 26 Sep 2009 06:13:25 -0400 (EDT)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <200909241151.HAA29183@smc.vnet.net>
- Reply-to: murray at math.umass.edu
I disagree: I would NOT want Labeled to be the default appearance for
sliders in Manipulate.
One reason: Look, for example, at:
Manipulate[Plot[Sin[x(1 + a x)],{x,0,6}],{{a,0,"Multiplier"},0,4}]
You can readily change the style of that label "Multiplier", e.g., to
make the font size larger or change its color, by wrapping it in a Style
expression:
Manipulate[Plot[Sin[x(1 + a x)],{x,0,6}],
{{a, 0, Style["Multiplier", 24, Red]}, 0, 2}]
But if you include an Appearance->"Labeled" option...
Manipulate[Plot[Sin[x(1 + a x)],{x,0,6}],
{{a,0,Style["Multiplier", 24, Red]}, 0, 2, Appearance -> "Labeled"}]
... then so far as I am aware you cannnot change the style of the
slider's numerical value as it appears to the right of the slider.
For presentations in class, I need to enlarge all the text, including
text display of numerical values. That does not seem possible for the
slider value just with the built-in Appearance option. What I need to
do is to change the body of the Manipulate to something like the following:
Manipulate[
Column[{Row[{Style["Multiplier = ", 24, Red], Style[a, 24, Red]}],
Plot[Sin[x (1 + a x)], {x, 0, 6}]}], {{a, 0,
Style["Multiplier", 24, Red]}, 0, 2}]
This way, I can make the label to the left of the slider and the current
value shown have the same size, among other style possibilities.
But were Appearance->"Labeled" the default, then I'd have to make an
additional change to default behavior so as to disable appearance of the
current-value displayed to the right of the slider.
Harut Amirjanyan wrote:
> ...I think Appearance -> "Labeled" should be the default behavior for sliders
> in Manipulate.
--
Murray Eisenberg murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305
- References:
- Showing the Current Value of a Slider in Manipulate
- From: Harut Amirjanyan <amirjanyan@gmail.com>
- Showing the Current Value of a Slider in Manipulate