# How to change the position of the statistics box on histogram plot?

**URL:** <https://root-forum.cern.ch/t/how-to-change-the-position-of-the-statistics-box-on-histogram-plot/28262>\
**Category:** Howto\
**Tags:** graphics\
**Created:** [March 9, 2018, 4:40pm UTC](https://root-forum.cern.ch/t/how-to-change-the-position-of-the-statistics-box-on-histogram-plot/28262 "2018-03-09T16:40:19Z")\
**Posts on this page:** 1\
**Page:** 1

<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:** [March 9, 2018, 4:40pm UTC](https://root-forum.cern.ch/t/how-to-change-the-position-of-the-statistics-box-on-histogram-plot/28262/1 "2018-03-09T16:40:19Z")

</div>

It is explained in the [reference guide](https://root.cern/doc/master/classTHistPainter.html#HP07). Basically, after the histogram has been plotted with its statistic box, it is enough to retrieve it in the histograms’ list of objects and change its position like shown in the following code snippet:

```auto
h->Draw();
gPad->Update();
TPaveStats *st = (TPaveStats*)h->FindObject("stats");
st->SetX1NDC(newx1); //new x start position
st->SetX2NDC(newx2); //new x end position

```
