# Circular AngularGauge does not roll over boundaries

I am using the Mma9 AngularGauge function to develop a controll for a rotating stage. I am experiencing several problems:

1. I am unable to get the values {0°, 90°, 180°, 270°}.
2. I am unable to align those values at arbitrary locations, e.g. 0° at the top.
3. I cannot make the needle roll over the 0° / 360° boundary, i.e. to get from 10° to 350° I have to "roll back".

In particular the function ScaleDivisions drives me nuts. In the figure below the 0 in 360 is drawn twice, not clearly visible here but obvious on my screen. I am not concerned about the "°" right now and my Mma9 installed without any error messages (unitil now).

AngularGauge[Dynamic[x], {0, 360}, ScaleDivisions -> {20, 2}, ScaleOrigin -> {0, 2 \[Pi]}, ImageSize -> {256, 256}, GaugeLabels -> "Value", GaugeMarkers -> "InsideScale"]

-
I guess internally FindDivisions is being used which has the (documented) habit of yielding the number of divisions that it thinks looks best. This often approaches, but does not equal, the number the user specified. –  Sjoerd C. de Vries Dec 4 '12 at 13:05
Is the 0 being drawn twice because it's showing both 0 and 360 in the same place? –  cormullion Dec 4 '12 at 13:09
@cormullion yes, changing {0,360} into {0,359.9} does not draw 360 while still letting you select it (although x is not updated to be 360, it is only gets to 359.9 but shows as 360 in the gauge) –  ssch Dec 4 '12 at 13:20
I guess that the developers' intent was that users would set the range to [0, 350} for gauges like this one. I suspect they did not intend to support roll over. I think they are mimicking physical gauges which don't roll over in my experience. –  m_goldberg Dec 4 '12 at 14:18
The 'ClockGauge' appears to be a normal 'AngularGauge' but with different labels and roll over. If that is true, there must be some functionality to add the roll over. –  Aart Goossens Dec 4 '12 at 15:08

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 -> {256, 256},
GaugeLabels -> "Value", GaugeMarkers -> "InsideScale"]


Note that the 360 and 0 in the same place really makes the gauge look broken now that 0 is drawn over the 6 making it look like 300 instead

-
Trust me, I tried all the obvious stuff and I am aware of the the ScaleOrigin option. I want to see 90° at the top. In your response 360 and 0 are also printed on top of each other. –  Ernst Stelzer Dec 4 '12 at 13:20
@ErnstStelzer yes I was clear this was just for second problem, with ScaleOrigin->{-2Pi,0} I have 90 at the top. –  ssch Dec 4 '12 at 13:28
@Ernst your question clearly states "e.g. 0° at the top." -- please try to be consistent. –  Mr.Wizard Dec 4 '12 at 13:31