MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Tick Values on Gauges

  • To: mathgroup at
  • Subject: [mg131787] Re: Tick Values on Gauges
  • From: "djmpark" <djmpark at>
  • Date: Thu, 3 Oct 2013 22:27:03 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • References: <2277.54355.1380784166474.JavaMail.root@m06>

Thanks Alexei, that gave me enough of a lead. This can easily be done with
Presentations by turning the ScaleDivisions off and using an XTickLine in an
Epilog option. The gauge is actually a Graphics expression inside a
DynamicModule. So the following achieved the desired ticks on the gauge:

<< Presentations`

HorizontalGauge[Dynamic[t], {-16, 16},

ScaleDivisions -> None,

Epilog -> {XTickLine[{0, 1, 0}, {-16, 16}, {-16, 16, 4}, 4,

    XLabTickSpecs -> {0.05, 0.0},

    XUnLabTickSpecs -> {0.025, 0.0}]},

ImageSize -> 300,

Frame -> False] 

The Frame can be set to True while designing the gauge ticks. Of course,
this only works for straight line gauges.

Here is an example with the ThermometerGauge where we can put the tick lines
across the thermometer tube. 

DynamicModule[{t = 0},

{ThermometerGauge[Dynamic[t], {-16, 16},

   ScaleDivisions -> None,

   Epilog -> {YTickLine[{0, 1, -0.0}, {-16, 16}, {-16, 16, 4}, 4,

      YLabTickSpecs -> {0.18, 0.0},

      YUnLabTickSpecs -> {0.1, 0.0}]},

   ImageSize -> 60,

   Frame -> False], Dynamic[t]}] 

The only problem is that this exposes a flaw with ThermometerGauge. Whenever
the first argument is a Dynamic[variable] the upper portion of the
thermometer is not drawn! And on the ThermometerGauge Function page there is
not a single example of using a Dynamic variable! Of course, we all know
that thermometers can't be used as input devices so maybe it's not that bad.

David Park

 <mailto:djmpark at> djmpark at 


From: Alexei Boulbitch [mailto:Alexei.Boulbitch at] 

Does anyone know how to specify custom tick values on gauges?
I would like to have an output gauge that has a range of -16 to 16 in steps
of 4.  The following, however, insists on using spacings of 5.
VerticalGauge[fval, {-16, 16},
ScaleDivisions -> {8, 1}] 
This seems to be another unnecessary design restriction imposed by WRI.
There is a Ticks option but it does not work.
David Park
djmpark at

Dear David,

I asked recently a very close question at the StackExchange:

As much as you can see from the answers to my question, there is no
satisfactory solution. In any non-standard case one has to build a
considerable part of the gauge himself. This we can do, however, also
without the WRI gauge template. 

Best, Alexei

Alexei BOULBITCH, Dr., habil.


ZAE Weiergewan,

11, rue Edmond Reuter,

L-5326 Contern, LUXEMBOURG


Office phone :  +352-2454-2566

Office fax:       +352-2454-3566

mobile phone:  +49 151 52 40 66 44


e-mail: alexei.boulbitch at


  • Prev by Date: Re: Output display by slide
  • Next by Date: Dynamically setting {min, max} in Angular Gauge[] & speed it up.
  • Previous by thread: Re: Tick Values on Gauges
  • Next by thread: Error in slope and intercept