Labeled destroys the log scales in "log" plots when notebook is re-opened
LogLogPlot
plots contain a dynamic objects which when you open the notebook, the security of Mathematica prevents the dynamic objects from being updated. Check this
What you can do is wrap your plot with dynamic and when opened again and when you click Enable Dynamic, you will get the correct plot.
Dynamic@Labeled[LogLogPlot[x, {x, 10^-5, 1}], "Test"]
The workaround suggested by Algohi works but it leads to reevaluation of the entire LogLogPlot
each time you open a Notebook. The following workaround avoids this:
With[{g = Labeled[LogLogPlot[x, {x, 10^-5, 1}], "Test"]}, Dynamic@g]
Another workaround is to place this Graphics
as Inset
inside of another Graphics
object:
pl = LogLogPlot[x, {x, 10^-5, 1}];
Labeled[Graphics[{Inset[pl, Center, Center, Scaled[1]]},
Options[pl, {AspectRatio, ImageSize}]], "LogLogPlot"]
(the correct ticks will be generated only after you click the Enable Dynamics button after opening the Notebook).
The essence of the bug is that FrontEnd does not update functional (i.e. Dynamic
) Ticks
specification when Graphics
is enclosed by Labeled
. The bug doesn't reveal itself in older Mathematica versions seemingly because in those versions the BoxData
of the output Cell
in the Notebook contains cached explicit Ticks
specification produced during first-time rendering of the output by the FrontEnd (the following is a truncated version of that specification generated by version 8.0.4):
Ticks -> FrontEndValueCache[{Charting`ScaledTicks[{Log, Exp}],
Charting`ScaledTicks[{Log, Exp}]}, {{{-13.122363377404328`,
FormBox[InterpretationBox[
StyleBox[GraphicsBox[{}, ImageSize -> {0., 0.}, BaselinePosition -> Baseline],
"CacheGraphics" -> False], Spacer[{0., 0.}]], TraditionalForm], {0.005,
0.}, {Thickness[0.001]}},
When Graphics
is wrapped by Labeled
Mathematica 10 (as opposed to version 8.0.4) doesn't generate this cache. And it is still ignoring functional Ticks
specification when Graphics
is wrapped by Labeled
.