Saving a histogram plot with a custom SetFillStyle

Hi there,

Sorry, I’m having a problem with saving a plot into a file. My histogram has
a custom SetFillStyle. I Draw it with “E2” option. It draws normally in the root canvas. However, when I save the plot into the file, the error bar disappears.

If I remove the line with SetFillStyle, then it’s sort of OK. But still
the plot in the canvas looks better than in the eps file, where it has little voids between the error bars.

Here is the simplified version of my code:

{
TH1F *hist=new TH1F("hist","",100,0,1);

for(int i=1;i<101;i++)
	{
	hist->SetBinContent(i,i);
	hist->SetBinError(i,sqrt(i));
	}
hist->SetFillColor(13);
hist->SetFillStyle(3001);
hist->SetMarkerStyle(2);
hist->Draw("E2");
gPad->Print("test.eps");
}

Thanks in advance

This must be an antialiasing effect of your postscript viewer. Disable antialiasing and the problem will disappear.

Rene

See the warning at the end of:
root.cern.ch/drupal/content/how- … -interface
This page tells you how to set up your gv viewer in order to avoid this effect.

I see. OK.

Thank you very much for the responses.