Tag Info

Hot answers tagged

7

For your purpose, you better use Row instead of GraphicsRow (Rotate[graphics..] is no longer graphics anyway). There is no option to set rotation of gauge tick but you could hack(?) to do that. I wrote a little function to rotate gauge and tick: rotate[gauge_] := Rotate[gauge /. Text[l_, r__] :> Text[Rotate[l, 270 Degree], r], 90 Degree] ...


6

Ticks does not appear to be an option for ThermometerGauge. (TicksStyle is.) You must use ScaleDivisions from what I can tell. Mathematica seems to be making some aesthetic judgment about the request for 3 scale divisions. It won't divide {0,100}, {0, 99} or {0,90} into 3 divisions but it happily does so for the scales {0, 30} and {0,300}. ...


5

I think HorizontalGauge is just buggy. It shouldn't trigger a dynamic update when you change its state but it does. Simplest case: HorizontalGauge[Dynamic[x]] // Dynamic I would try using this "fixed" version horizontalGauge = Refresh[HorizontalGauge[##], None] & By the way, you could stick this into the built-in symbol's definition, and perhaps if ...


3

Adding the option TrackedSymbols :> {LowerLimit, UpperLimit} to the Dynamic[..] that holds HorizontalGauge fixes the issue: DynamicModule[{y = 1, LowerLimit = 1, UpperLimit = 10}, Column[{Row[{PopupMenu[Dynamic[LowerLimit], {1, 2, 3, 4}], PopupMenu[Dynamic[UpperLimit], {5, 6, 7, 8, 9, 10}]}], Dynamic[HorizontalGauge[Dynamic[y], {LowerLimit, ...


2

another hack, turn them off and draw manualy.. Show[ { Graphics[ { Text[#, {-.1, .01 #}] , Line[{{-.01, 0.01 #}, {-.065, .01 #}}]}] & /@ Table[33 i , {i, 0, 3}] , Graphics[ Line[{{-.01 , 0.01 #}, {-.065/2, .01 #}}] ] & /@ Table[3 i , {i, 0, 33}], ThermometerGauge[33, {1, 99}, ScaleDivisions -> ...


2

Are there really sufficiently many assignable pixel locations such that you can drag a Controller to such a resolution? Would you be satisfied if the range were small enough that the MinIntervalSize you seek could be rendered? After all, this will work: IntervalSlider[{.003, .007}, {0., .010}, ImageSize -> 600, MinIntervalSize -> .00000001, ...


1

Few notes: try to avoid Manipulate for complex things. When you have multiple controllers (of the same variable) inside body of Manipulate it triggers evaluation unless you use nested Dynamic/Refresh. Moreover, referring your last example, take a look at: Function[{m, r}, Round[m, r]][Dynamic[5.5], 1]. DynamicModule[{n = 10.123, interval = {10, 20}}, ...


1

You simply need to scale your gauge to display timer value in seconds by dividing by 60. Here is a 3-minute gauge. With[{val = 100, sec = 180}, HorizontalGauge[val/60, {sec/60, 0}, GaugeStyle -> Hue[Rescale[val, {0, sec}, {0, 0.3}]], GaugeMarkers -> "GlassRectangle", ScaleDivisions -> 3, ImageSize -> 500, ScalePadding ...


1

I do not know any undocumented option but here is a solution: static ThermometerGauge: ticks[{s_, k_}, {p_, q_}] := ReplaceAll[#, { {{_, Scaled[{-0.1, _}, _]} ..} :> ({{0., #}, Scaled[{-0.1, 0}, {0., #}] } & /@Table[i/k, {i, s, k, (k - s)/p}]), {{_, Scaled[{-0.065, _}, _]} ..} :> ({{0., #}, Scaled[{-0.065, ...


1

For #2, you can adjust ScaleOrigin to set start/end angle to be wherever you like say you want 0 at angle $\theta$ use ScaleOrigin->{\[Theta]-2\[Pi],\[Theta]} or interchange the order to have the gauge increase in the other direction. AngularGauge[Dynamic[x], {0, 360}, ScaleDivisions -> {20, 2}, ScaleOrigin -> {Pi/2, (-3 Pi)/2}, ImageSize -> ...



Only top voted, non community-wiki answers of a minimum length are eligible