Skip to main content
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

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".

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 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 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".

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 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 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".

added 214 characters in body
Source Link
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375

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).

I think that this bug is strongly related (if not the same).

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 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 workaround is to use Paste instead of Print:

Button["Print", Paste[plot]]

CellPrint works too:

Button["Print", CellPrint[ExpressionCell[plot, "Output"]]]

The workaround suggested 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".

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).

I think that this bug is strongly related (if not the same).

By the essence FrontEnd simply "forgets" that Dynamic (functional) Ticks must be updated when displaying Graphics for the first time.

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 the shortest workaround is to use Paste instead of Print:

Button["Print", Paste[plot]]

CellPrint works too:

Button["Print", CellPrint[ExpressionCell[plot, "Output"]]]

The workaround suggested 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".

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 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 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".

added 214 characters in body
Source Link
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375

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:

Button["Print"plot = Show[LogPlot[x^10, Print[
{x, 1, Show[plot10}],
   
  Ticks -> {Charting`ScaledTicks[{Log, Exp}]Automatic, Charting`ScaledTicks[{Log, Exp}]}]]]]

Button["Print", Print[plot]]

(the key is that Ticks are specified as a function in the final Graphics).

I think that this bug is closelystrongly related (if not the same).

By the essence FrontEnd simply "forgets" that Dynamic (functional) Ticks must be updated when displaying Graphics for the first time.

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}]]]

An additionalFor the case of Button the shortest workaround is to use Paste instead of Print:

Button["Print", Paste[plot]]

CellPrint works too:

Button["Print", CellPrint[ExpressionCell[plot, "Output"]]]

The workaround suggested 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".

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:

Button["Print", Print[
  Show[plot,
    Ticks -> {Charting`ScaledTicks[{Log, Exp}], Charting`ScaledTicks[{Log, Exp}]}]]]

I think that this bug is closely related (if not the same).

By the essence FrontEnd simply "forgets" that Dynamic (functional) Ticks must be updated when displaying Graphics for the first time.

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}]]]

An additional workaround is to use Paste instead of Print:

Button["Print", Paste[plot]]

The workaround suggested 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".

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).

I think that this bug is strongly related (if not the same).

By the essence FrontEnd simply "forgets" that Dynamic (functional) Ticks must be updated when displaying Graphics for the first time.

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 the shortest workaround is to use Paste instead of Print:

Button["Print", Paste[plot]]

CellPrint works too:

Button["Print", CellPrint[ExpressionCell[plot, "Output"]]]

The workaround suggested 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".

added 567 characters in body
Source Link
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375
Loading
Source Link
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375
Loading