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

It is explained in the reference guide. 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:

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