Removing fit stats box from TGraphAsymmErrors object

Dear ROOT experts

I have a TCanvas, containing a TGraphAsymmErrors object, saved as a .root file. The TGraphAsymmError object contains fit stats box. I am accessing the TGraphAsymmError object from another code and want to Draw() it in a new canvas without the stats box and save it. When I call grErr->SetStats(kFALSE), where grErr is the pointer to the TGraphAsymmErrors object, I get the error “no member named 'SetStats' in 'TGraphAsymmErrors'”. I checked the manual. TGraphAsymmError inherits from TGraph publicly and so should have the SetStats() method. What am I doing wrong here?

Thanks & Regards
Shubham Dutta

_ROOT Version: 6.24/06
_Platform: Ubuntu 16.04
_Compiler: g++ 5.4.0 20160609


Try (after drawing):

grErr->GetHistogram()->SetStats(kFALSE);

Hello @dastudillo,

Thanks for your prompt response. I tried your solution but it didn’t work. Btw, I am drawing with the drawing option AP, in case if that’s relevant.

Thanks & Regards
Shubham Dutta

In principal TGraph does not have stats. Can you post a macro reproducing your problem ?

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