The canvas appears and half a second after it disappears. I know by doing python -i the canvas stays but then I have to write the command “.q” to exit python, which is painful when I have to do it a lot of time…
I am definitively not a pyroot expert and I searched on internet solutions such as SetOwnership but I didn’t understand what to do precisely.
when the program terminates, all of the memory associated to it is given back to the os, including the allocated objects, like the TCanvas: this is independent of pyroot.
If you want, you can save your canvases as images using the method TCanvas::Print.
No and I think this is a sane feature of all operating systems.
This is a good option. It allows to write a program in python that does 99% of the work and allows you to refine the final few plots for the forthcoming presentation/publication.
if all you need is the GUI (i.e. no CLI at all), you can use:ROOT.gApplication.Run()instead of raw_input(). The application will then close if you choose “Quit ROOT” from the canvas (but not if you only close the canvas itself).