How to remove legend from my canvas (supplement: it was a stats box)

Dear Root experts,

I wonder how to remove a ‘legend’ from my canvas(or from my histogram).
I didn’t set anything about the legend, but Root automatically draw it.
How can I remove it?


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

I suppose you mean the statistics box, not a TLegend.
Either do


at the beginning of your macro, or


before drawing ‘yourhisto’.


I’ve been doing stupid things. Thank you for your answer!