Re: Re: Re: Showing the Current
- To: mathgroup at smc.vnet.net
- Subject: [mg103563] Re: [mg103528] Re: [mg103520] Re: [mg103487] Showing the Current
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Sun, 27 Sep 2009 23:08:24 -0400 (EDT)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <200909241151.HAA29183@smc.vnet.net> <9236202.1253961621866.JavaMail.root@n11> <200909271129.HAA04905@smc.vnet.net>
- Reply-to: murray at math.umass.edu
That's an elegant solution to styling the label value, too, in a Manipulate. And it's consistent with my opinion that I would not want Appearance->"Labeled" to be the default, for if it were, then with a solution such as this one would get the slider's current value twice -- once from the Dynamic@Style expression, and the second time from the Appearance->"Labeled". David Park wrote: > 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
- References:
- Showing the Current Value of a Slider in Manipulate
- From: Harut Amirjanyan <amirjanyan@gmail.com>
- Re: Re: Showing the Current Value of a Slider in Manipulate
- From: "David Park" <djmpark@comcast.net>
- Showing the Current Value of a Slider in Manipulate