# How to show statbox for stack histogram

**URL:** <https://root-forum.cern.ch/t/how-to-show-statbox-for-stack-histogram/33915>\
**Category:** ROOT\
**Created:** [May 6, 2019, 11:10am UTC](https://root-forum.cern.ch/t/how-to-show-statbox-for-stack-histogram/33915 "2019-05-06T11:10:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 6, 2019, 11:18am UTC](https://root-forum.cern.ch/t/how-to-show-statbox-for-stack-histogram/33915/2 "2019-05-06T11:18:37Z")

</div>

> [@TH1F - read and made histogram](https://root-forum.cern.ch/t/th1f-read-and-made-histogram/32801/8):
>
> That’s maybe something for @couet In the meantime, you could try: gStyle-\>SetOptStat(); // just a precaution ((TH1\*)(hs-\>GetStack()-\>Last()))-\>Draw("HIST L"); // the sum hs-\>Draw("SAME HIST L"); or: gStyle-\>SetOptStat(); // just a precaution TH1 \*hl = ((TH1\*)(hs-\>GetStack()-\>Last())); // the sum hl-\>SetNameTitle("MyName", "my title;my X axis;my Y axis"); hl-\>Draw("HIST L"); hs-\>Draw("SAME HIST L"); where, instead of: hl-\>SetNameTitle("MyName", "my title;my X axis;my Y axis"); you could us…

---

_[View the full topic](https://root-forum.cern.ch/t/how-to-show-statbox-for-stack-histogram/33915)._
