I am stumped by a problem I’m having trying to get the E2 option to work with histograms I am drawing. I am using OSX High Sierra (10.13.3), root v6.12.04.
In none of my root code or macros does the E2 option work in drawing a histogram. Nothing shows up on my canvas. The other draw options work fine, showing histos, markers with error bars, etc. For instance, both E3 and E4 options work as expected. Here is a bit of code as an example.
I can’t share that histo file, as it turns out. So, how about this instead (for the problem I’m seeing, it doesn’t seem to matter where the histo comes from, how it is made, etc.). I will note that what I see on the canvas does not correspond to what I see in the pdf file that is written (a secondary problem). On the canvas I see vertical error bars with light shading. In the pdf file, nothing shows up within the plot.
{
auto c1 = new TCanvas("c1","c1",800,600);
auto h = new TH1F("h","h",10,0.,10.);
for (int i = 0; i <= 10; i++) {
for( int j = 1; j <= 10; j++) h->Fill(i,(double)i);
}
h->SetMarkerSize(0.);
h->SetFillStyle(3003);
h->SetMarkerColor(kRed);
h->SetFillColor(kRed);
h->Draw("E2");
c1->Print("test.pdf");
}
it gives me the following picture on Mac with ROOT 6.12. On the left the pdf on the right the canvas.
I now suspect something in my .rootlogon.C is creating the problem. It loads what are supposed to be necessary ATLAS styles. I will try without that. That would be an unfortunate source of the problem, as generally I need to run the style macro for ATLAS plots.