# Removing fit stats box from TGraphAsymmErrors object

**URL:** <https://root-forum.cern.ch/t/removing-fit-stats-box-from-tgraphasymmerrors-object/47037>\
**Category:** ROOT\
**Tags:** root\
**Created:** [September 28, 2021, 10:07pm UTC](https://root-forum.cern.ch/t/removing-fit-stats-box-from-tgraphasymmerrors-object/47037 "2021-09-28T22:07:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shdutta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/shdutta/32/21488_2.png) [@shdutta](https://root-forum.cern.ch/u/shdutta)\
**Post date:** [September 28, 2021, 10:07pm UTC](https://root-forum.cern.ch/t/removing-fit-stats-box-from-tgraphasymmerrors-object/47037/1 "2021-09-28T22:07:31Z")

</div>

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

* * *

---

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [September 29, 2021, 6:45am UTC](https://root-forum.cern.ch/t/removing-fit-stats-box-from-tgraphasymmerrors-object/47037/2 "2021-09-29T06:45:55Z")

</div>

Try (after drawing):

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

```

---

<div class="post-metadata">

**Author:** ![shdutta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/shdutta/32/21488_2.png) [@shdutta](https://root-forum.cern.ch/u/shdutta)\
**Post date:** [September 29, 2021, 7:59am UTC](https://root-forum.cern.ch/t/removing-fit-stats-box-from-tgraphasymmerrors-object/47037/3 "2021-09-29T07:59:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [September 29, 2021, 8:05am UTC](https://root-forum.cern.ch/t/removing-fit-stats-box-from-tgraphasymmerrors-object/47037/4 "2021-09-29T08:05:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [October 13, 2021, 8:05am UTC](https://root-forum.cern.ch/t/removing-fit-stats-box-from-tgraphasymmerrors-object/47037/5 "2021-10-13T08:05:30Z")

</div>

Closed on October 13, 2021, 8:05am UTC

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