PyROOT keep plots open

I’m new to PyROOT, and the command-line interpreting tool is great, as is PyROOT in a Jupyter notebook. I need to use some data on a server, however, and so I can’t use a Jupyter notebook, and as soon as you want to do more than 3 things or want to be able to modify your code as you go, doing it through the python command-line isn’t very efficient, but if you just do python PythonScript.py as soon as the script ends, it closes and you can’t see the plots anymore.

I realise that I’m opening myself up to the question “why not just use a c++ macro?”, which is a question I’m asking myself, but I was wondering if there was a way of writing some python, running it, and having the plots stay open, as if you’d done root -l CMacro.C.

I hope the question’s relatively clear!

python -i PythonScript.py

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.