I am encountering really strange behavior: I wrote a function that plots values some data. After executing the code the resulting plot has the red 'error' colour, but only momentarily (maybe 0.1 sec). There is no error message, so the plot seems fine. However, when I export the graphic, the red colour is exported too. There seems no way to get the graphic without the red.

I am (in this case) not interested in what caused the error message but want to export the graphic without te red colour. Does anyone know how to do this? I tried using Quiet[] but that did not help.

My code:








The command to actually plot is (this produces the plot I am talking about)

PlotBetaCI[rmssd, everyminutermssd]

rmssd is a list of values. everyminutermssd has the same length, but depth 10.

  • $\begingroup$ Can you show us the code? $\endgroup$
    – mfvonh
    Commented Jun 23, 2014 at 14:02
  • $\begingroup$ The code is quite complicated and I think it is beyond the scope of the question. But I will add it anyway, for sake of completeness ;) $\endgroup$ Commented Jun 23, 2014 at 14:05
  • $\begingroup$ Ok, by clicking fast enough on the 'error message plus sign' next to the graphic (believe me, that was difficult) I managed to track down the error and fix my code. However, I am still wondering if it is possible to export a graphic without the red error colour. $\endgroup$ Commented Jun 23, 2014 at 14:20
  • $\begingroup$ I think you can't avoid finding out what caused the error ... if the red colour is only momentary, that probably indicates that you're using Dynamic or related things (directly or indirectly). Do you have any explicit dynamic things in that graphic? You can try right clicking the graphic and exporting like that too. (Though the quality won't be the same in version 9.) $\endgroup$
    – Szabolcs
    Commented Jun 23, 2014 at 14:44
  • $\begingroup$ Can you post some example data (rmssd, everyminutermssd ), e.g. generated with random, to make the code complete and allow us to reproduce the problem? $\endgroup$
    – Szabolcs
    Commented Jun 23, 2014 at 14:47

1 Answer 1


The pink box shows a formatting error. You can disable highlighting of formatting errors for a specific object using Style:

 Graphics[{Disk[], garbage}],
 AutoStyleOptions -> {"HighlightFormattingErrors" -> False}]

enter image description here

You can also change the setting globally using the Preferences dialog (Edit - Preferences - Messages - Formatting error indications), or just for the current session using:

SetOptions[$FrontEndSession,  AutoStyleOptions -> {"HighlightFormattingErrors" -> False}]
  • $\begingroup$ Off[N::precsm]; Works just fine. $\endgroup$
    – Carl
    Commented Sep 30, 2022 at 3:47

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.