# Can one preserve the appearance of the HorizontalGauge?

I use sometimes the HorizontalGauge instead of a slider in Manipulateor instead of the ProgressIndicator. I find it very convenient, since it gives quantitative information on the status of the calculation. During performing the calculation it looks as it is expected: However, when I close a notebook and then open it once more, it looks as follows: Which is, generally, ugly.

Is there a way to preserve its form, so that it has the former performance also after closing/opening of the notebook?

Edit: To address the question of Kuba, a simplistic code with the described behavior is given below. It shows the use of the HorizontalGauge instead of the ProgressIndicatorto monitor the solution of a differential equation:

    Clear[x, y, data, k];
data = {{0, 1}};
k = 0;
HorizontalGauge[Dynamic[k], {0, 30}]
Dynamic[ListPlot[data, Frame -> True,
PlotRange -> {{0, 31}, {0, 1.2}}]]
NDSolve[{y'[x] == y[x] Cos[x + y[x]], y == 1}, y, {x, 0, 30},
StepMonitor :> (Pause[.02]; Set[k, x]; AppendTo[data, {x, y[x]}])];


On the screen one should see the following: The HorizontalGaugehere shows the state of the solution of the differential equation. After evaluation it has the canonical appearance. However, after closing/opening of the notebook its appearance changes.

Another example is the use of the gauge in Manipulate:

 Manipulate[
Plot[Sin[a x], {x, 0, 4 Pi}], {{a, 1}, 0, 6.28,
VerticalGauge[##, ImageSize -> 50] &}, ControlPlacement -> Left] Here in contrast to the previous case the VerticalGauge preserves its appearance even after closing/opening of the notebook.

• @Kuba Please see the edit. – Alexei Boulbitch Jan 21 '16 at 9:23
• I see. When the plot is done I'm saving the nb and closing MMA, after reopening it looks ok, only plot doesn't due to the fact that data doesn't exist anymore. I'm on Win10 V10.3.1 – Kuba Jan 21 '16 at 9:25
• @Kuba Yes, exactly. But my main concern is not the plot, but the appearance of the gauge. I gave one more example of the gauge use in Manipulate. There everything is OK, the appearance persists the closing/opening of the notebook. – Alexei Boulbitch Jan 21 '16 at 9:41
• Yes, I know, my point was, the gauge looks ok in my case. – Kuba Jan 21 '16 at 9:42
• @Kuba, Well I have Win7/Mma10.3 – Alexei Boulbitch Jan 21 '16 at 9:43