# Cannot get both stat boxes to show when using draw-\>(SAME)

**URL:** <https://root-forum.cern.ch/t/cannot-get-both-stat-boxes-to-show-when-using-draw-same/59737>\
**Category:** Newbie\
**Created:** [June 21, 2024, 8:07pm UTC](https://root-forum.cern.ch/t/cannot-get-both-stat-boxes-to-show-when-using-draw-same/59737 "2024-06-21T20:07:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lneidlin](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@lneidlin](https://root-forum.cern.ch/u/lneidlin)\
**Post date:** [June 21, 2024, 8:07pm UTC](https://root-forum.cern.ch/t/cannot-get-both-stat-boxes-to-show-when-using-draw-same/59737/1 "2024-06-21T20:07:42Z")

</div>

_ROOT Version:_ Not Sure I’m Sorry  
_Platform:_ Visual Studio Code C++  
_Compiler:_ Also not sure

I am using the -\>Draw(“SAME”) command for two histograms on the same canvas and I cannot get the first stat box to show up, only the second. I’ve tried a ton of stuff and nothing is working, any help would be greatly appreciated.

````auto
TCanvas *c1 = new TCanvas();
    c1->Divide(4,4);
    for (int l=0; l<16; l++){
        c1->cd(l+1);
        nrpdrun374810[l]->SetMarkerColor(kRed);
        nrpdrun374810[l]->SetMarkerStyle(20);
        nrpdrun374810[l]->SetMarkerSize(0.5);
        nrpdrun375259[l]->SetMarkerColor(kBlue);
        nrpdrun375259[l]->SetMarkerStyle(20);
        nrpdrun375259[l]->SetMarkerSize(0.5);

        nrpdrun375259[l]->Draw("P");
        nrpdrun374810[l]->Draw("SAME P");
        legend[l]->Draw("");
    }

c1->Update();
___```
````

---

<div class="post-metadata">

**Author:** ![yus](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/y/9fc348/32.png) [@yus](https://root-forum.cern.ch/u/yus)\
**Post date:** [June 21, 2024, 9:42pm UTC](https://root-forum.cern.ch/t/cannot-get-both-stat-boxes-to-show-when-using-draw-same/59737/2 "2024-06-21T21:42:14Z")

</div>

Hi,

to make both stat boxes to appear, you need to draw the second histogram with the “`SAMES`” (or “`sames`”) option, but not “`SAME`” (or `"same"`). But even then the first stat box will be “behind” the second one, so you will have to move them around yourself.

---

<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:** [June 24, 2024, 5:54am UTC](https://root-forum.cern.ch/t/cannot-get-both-stat-boxes-to-show-when-using-draw-same/59737/3 "2024-06-24T05:54:52Z")

</div>

See: [ROOT: tutorials/hist/transpad.C File Reference](https://root.cern/doc/master/transpad_8C.html)

---

<div class="post-metadata">

**Author:** ![lneidlin](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@lneidlin](https://root-forum.cern.ch/u/lneidlin)\
**Post date:** [June 24, 2024, 2:37pm UTC](https://root-forum.cern.ch/t/cannot-get-both-stat-boxes-to-show-when-using-draw-same/59737/4 "2024-06-24T14:37:43Z")

</div>

that worked, thank you so much I had been stuck on that for days
