5
$\begingroup$

Bug introduced in 8 or earlier and fixed in 11.3
Reported to the support as [CASE:3984748]


Consider the following plot with a Button placed as PlotLabel:

ListLinePlot[Table[RandomReal[1, 1000], {i, 8}], PlotRange -> All, 
 PlotLabel -> Button["Press me!", Appearance -> None]]

screenshot

After clicking the button and moving the mouse out it gets blue background:

screenshot2

(Note that this doesn't happen if the number of plotted points is substantially reduced: e.g., replace 1000 with 100 in the code above and you won't see this.)

How can I avoid this? I wish to have the default appearance after releasing the button.

(Mathematica 11.2.0, Windows 7 x64.)

$\endgroup$
5
  • $\begingroup$ same issue in version 9.0 MS Windows (64-bit) $\endgroup$
    – kglr
    Commented Dec 19, 2017 at 23:21
  • 3
    $\begingroup$ Does basestyle/cachegraphics/false for plot help? - sent from Nokia 3310 $\endgroup$
    – Kuba
    Commented Dec 19, 2017 at 23:23
  • 1
    $\begingroup$ @Kuba Yes, BaseStyle -> {"CacheGraphics" -> False} solved the problem. You can post the answer and I'll accept it. $\endgroup$ Commented Dec 19, 2017 at 23:25
  • $\begingroup$ @AlexeyPopkov ok, done, please report it anyway. $\endgroup$
    – Kuba
    Commented Dec 20, 2017 at 9:15
  • 1
    $\begingroup$ @Kuba Reported to the support as [CASE:3984748]: "<...> I was able to reproduce the behavior you described and will forward this to our development team. <...>" $\endgroup$ Commented Dec 29, 2017 at 1:34

1 Answer 1

3
$\begingroup$

The fix is to add BaseStyle -> CacheGraphics -> False around:

ListLinePlot[
  Table[RandomReal[1, 1000], {i, 8}]
, PlotRange -> All
, PlotLabel -> Button["Press me!", Appearance -> None]
, BaseStyle -> CacheGraphics -> False
]

I would love to elaborate but this option is undocumented and the reason I knew it may be related is because I have faced similar issues:

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.