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.
rmssd, everyminutermssd
), e.g. generated with random, to make the code complete and allow us to reproduce the problem? $\endgroup$ – Szabolcs Jun 23 '14 at 14:47