TCanva flash back

Hello rooter

I try to run the [] which is a example of the root tutorial .

the link as follows.;a … 22;hb=HEAD

The flashback of the TCanvas takes place. it means that the TCanvas displayed and fast closed.

any idea?

looking forward to replying.

best regards.


the Canvas “flashes” since it is created and immediately after the program finishes: this is expected and understood.
A general trick to delay the exit of a python program (for example to inspect/modify a plot) is to add something like

raw_input("Press any key to exit")

at the end of the program.


The default if you do “python” is to run the script and then exit. If you want to be left with the Python interpreter after the script is done, you need to add the “-i” option, like this: “python -i”.


dpiparo and Jean-François

Thank you for your quick replying. using your two method, the problem is solved.

Thank you again!

Have a nice day!