# Plot has red 'film', no error message

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:

 PlotBetaCI[whole_,everyminute_]:=
Module[
{len,linearmodels,betas,lows,highs},

len=Length[everyminute];

linearmodels=Quiet@LinearModelFit[Transpose[{#,whole}],x,x]&/@everyminute;

betas=Transpose[{Range[len],#["ParameterConfidenceIntervalTableEntries"][[2,1]]&/@linearmodels}];

lows=Transpose[{Range[len],#["ParameterConfidenceIntervalTableEntries"][[2,3,1]]&/@linearmodels}];

highs=Transpose[{Range[len],#["ParameterConfidenceIntervalTableEntries"][[2,3,2]]&/@linearmodels}];

ListPlot[{betas,Sequence@@Transpose[{lows,highs}]},Joined->{False,Sequence@@ConstantArray[True,len]},PlotStyle->Black,PlotMarkers->{Graphics[{Line[{{-1,-1},{1,1}}],Line[{{-1,1},{1,-1}}]},ImageSize->10],Sequence@@ConstantArray[Graphics[{Line[{{0,0},{0.04,0}}]},ImageSize->10],len]},ImageSize->Large,PlotRange->{Automatic,{Automatic,1.5}}]
]


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.

• Can you show us the code? – mfvonh Jun 23 '14 at 14:02
• 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 ;) – Aart Goossens Jun 23 '14 at 14:05
• 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. – Aart Goossens Jun 23 '14 at 14:20
• 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.) – Szabolcs Jun 23 '14 at 14:44
• 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? – Szabolcs Jun 23 '14 at 14:47

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

SetOptions[\$FrontEndSession,  AutoStyleOptions -> {"HighlightFormattingErrors" -> False}]