Re: Re: Showing the Current Value of a Slider in Manipulate
- To: mathgroup at smc.vnet.net
- Subject: [mg103528] Re: [mg103520] Re: [mg103487] Showing the Current Value of a Slider in Manipulate
- From: "David Park" <djmpark at comcast.net>
- Date: Sun, 27 Sep 2009 07:29:48 -0400 (EDT)
- References: <200909241151.HAA29183@smc.vnet.net> <9236202.1253961621866.JavaMail.root@n11>
What about: Manipulate[ Plot[Sin[x (1 + a x)], {x, 0, 6}], {{a, 0, Dynamic@Style[ Row[{"Multiplier: ", NumberForm[a, {4, 3}], Spacer[5]}], 24, Red]}, 0, 2}] David Park djmpark at comcast.net http://home.comcast.net/~djmpark/ From: Murray Eisenberg [mailto: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
- Follow-Ups:
- Re: Re: Re: Showing the Current
- From: Murray Eisenberg <murray@math.umass.edu>
- Re: Re: Re: Showing the Current
- 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