I confirm this behavior with version 11.0.0 on Windows 7 x64. With a slight modification of the original code I was able to reproduce this behavior also with version 8.0.4:
plot = Show[LogPlot[x^10, {x, 1, 10}],
Ticks -> {Automatic, Charting`ScaledTicks[{Log, Exp}]}]
Button["Print", Print[plot]]
(the key is that Ticks
are specified as a function in the final Graphics
).
By the essence FrontEnd simply "forgets" that Dynamic
(functional) Ticks
must be updated when displaying Graphics
on-screen for the first time.
I think that this bugthis bug is strongly related. The only difference is that in that case FrontEnd "forgets" that functional Ticks
must be updated when displaying Graphics
for the first time after reopening saved Notebook.
The workarounds from the linked thread work:
Button["Print", Print[Dynamic@plot];]
Button["Print",
Print@Graphics[{Inset[plot, Center, Center, Scaled[1]]},
Options[plot, {AspectRatio, ImageSize}]]]
For the case of Button
there are additional workarounds and the shortest is to use Paste
instead of Print
:
Button["Print", Paste[plot]]
CellPrint
works too:
Button["Print", CellPrint[ExpressionCell[plot, "Output"]]]
The workaround suggested by rcollyersuggested by rcollyer also works:
Button["Print", Print[plot], Method -> "Queued"]
but I see no reason why the original code shouldn't work with the default Method -> "Preemptive"
.