Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to have the value for a vertical slider display next to the indicator arrow for a vertical slider. However, my attempt is slightly wrong; the coordinates are scaled to the entire frame of the vertical slider (and not the coordinates), so at the minimum and maximum values, the location of the label is slightly off.

How can I get this to work correctly? When I don't use Scaled, the label goes way off of the vertical slider, but when I do used it, it scales to the wrong values.


    Style[" Sample ", 12, Bold, Underlined]},
   {VerticalGauge[length, {0, 100},
     GaugeFaceStyle -> LightGray,
     GaugeLabels -> Placed[Automatic, Scaled[{0, length/100}]]
  Alignment -> Center],
 {length, 0, 100}


share|improve this question
up vote 4 down vote accepted

The padding is approximately eight percent both at the top and the bottom, so this will work pretty good:

Scaled[{0, 0.08 + 0.84 length/100}]

To understand how I got it, try substituting 0 and 100 respectively for length.

share|improve this answer
thank you very much! that works great for the sample, I'll have to make a few tweaks to get it working for different scales but the concept is great, thanks again! – madacho Jan 22 '14 at 22:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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