Fixing TStyle default settings if name="ATLAS"

Dear ROOT developers,

I noticed that TStyle default settings are not working well if name==“ATLAS”. The problem is on line 386 in https://root.cern.ch/doc/master/TStyle_8cxx_source.html

SetErrorX(0.0001);

This line is breaking plottting style in the recent root versions and it should be removed. Plots look fine after removal of this line.

Best regards,
Petr Jacka

_ROOT Version: ~6.14 or newer
_Platform: Does not matter
_Compiler: Does not matter


Thank you for reporting, our graphics expert @couet will have a look at this when he is back from vacation.

This style was a direct copy of the ATLAS style.
Do you have an example showing the “broken plot” ?

The style is not an exact copy of the current version of the ATLAS style. SetErrorX(0.0001); was removed about 1 year ago, see Sign in to CERN.

The issue is reproducible easily by using the following lines:

root [1] TH1D* h = new TH1D (“h”, “histo from a gaussian”, 100, -3, 3);
root [2] h->FillRandom(“gaus”, 10000);
root [3] h->Sumw2();
root [4] h->Draw();
Info in TCanvas::MakeDefCanvas: created default TCanvas with name c1
root [5] gStyle->SetErrorX(0.0001);
root [6] h->Draw();


ok I will remove that line.

Ah, I see that “ATLAS” predefined option is not in root 6.12 and it is in root 6.14. This fully explain the issue. Why this is added to the root itself? Was it after some request?

Thanks!

PR on the way …

merged

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.