White clearance between marker and error bar

Hi All,

I am having a problem with the output of hist->SaveAs(“plot.eps”). My histograms look great except that there is a white gap between the markers and error bar lines. This means that if the error bar is small it is in fact not visible because of this clearance around the marker. I have tried everything I could think of but no luck. Please let me know if you have any ideas. I currently write the histo like this:


I am using ROOT 5.26/00.

But I have tried modifying and excluding just about every line so I am not even sure my problem is in the code I post here. I am more hoping that someone has had the same problem and knows what causes it.

Any ideas are appreciated.

Thank you,

I tried the following macro with the latest root version.

   c1 = new TCanvas("c1","A Simple GraphErrors Example",200,10,700,500);
   const Int_t n = 20;
   Double_t x[n], y[n], ex[n], ey[n];
   for (Int_t i=0;i<n;i++) {
     x[i]  = i*0.1;
     y[i]  = 10*sin(x[i]+0.2);
     ex[i] = 0.08;
     ey[i] = 0.1*i;
   TGraphErrors *gr1 = new TGraphErrors(n,x,y,ex,ey);

It gives me the attached eps file which does not show any gap.

I don’t see an attachment, but executing your code and then opening the pdf I see that you do still have the clearance but it is very small for you. Mine is probably 2-3 times as big. Do you see a little space between the marker and error bar? Maybe it’s my viewer that is doing it…

Thank you.

I do not see any gap at all (see attached pdf). It could be that it was a problem which has been fixed. Your ROOT version is a bit old.
c1.pdf (14.4 KB)

ah, you are right. I do not see it in your picture. Ok, thank you, that gives me some ideas on where to look for my problem.