Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15589 > unrolled thread

Re: Tick Values on Gauges

Started by"djmpark" <djmpark@comcast.net>
First post2013-10-04 02:10 +0000
Last post2013-10-04 02:10 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Tick Values on Gauges "djmpark" <djmpark@comcast.net> - 2013-10-04 02:10 +0000

#15589 — Re: Tick Values on Gauges

From"djmpark" <djmpark@comcast.net>
Date2013-10-04 02:10 +0000
SubjectRe: Tick Values on Gauges
Message-ID<l2l82d$4vs$1@smc.vnet.net>
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@comcast.net> djmpark@comcast.net 

 <http://home.comcast.net/~djmpark/index.html>
http://home.comcast.net/~djmpark/index.html 

From: Alexei Boulbitch [mailto:Alexei.Boulbitch@iee.lu] 

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 comcast.net 
 
http://home.comcast.net/~djmpark/index.html
<http://home.comcast.net/%7Edjmpark/index.html>  
 

Dear David,

I asked recently a very close question at the StackExchange:

http://mathematica.stackexchange.com/questions/28348/how-to-fix-ticks-in-gau
ges

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.

IEE S.A.

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@iee.lu

 

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web