Save TMVA output plots automatically (without using GUI)

Hello!

I was wondering if there was a way for me to access and save (as a PDF) several of the TMVA GUI plots that are generated at the end of training? I would like to do this without the need to even open the GUI if possible.

For example. Once a BDT has been trained, the GUI gives access to a plot “(4a) Classifier output distribution”. I would like to save this as a PDF. I am unfortunately not too well versed in root and its documentation, so please bear with me if i have any follow up questions!

Thanks :slight_smile:

Hi @smitmatt,

I am inviting @moneta to this topic, as the relevant expert in TMVA.

Cheers,
J.

Hello,
any updates on this?

A Graphical User Interface (GUI) is, by definition an interactive, thing allowing to interact with a program. The only way I would think of to “save a GUI”. as an image would be to do a screen capture (as png for instance). Unless “GUI” is something else in your mind. May be @moneta will have an idea in that case.

Hello,

Thank you for the reply. I am aware that a GUI is interactive. I am not trying to save an image of the GUI, I am trying to save an image of the plots that are made accessible through the GUI. Like, for example, the “Classifier output distribution” plot that is presented to the user after pressing on button 4a. As further explanation, the plots are automatically saved as PDF’s to a folder once you have clicked the corresponding button on the GUI, I simply don’t want to click the button after every single training run. In fact, if I could avoid Graphically displaying the GUI on my screen all together while still being able to save a PDF of the plots I am interested in, that would be my ideal scenario.

Hopefully I have clarified my question. Thank you again in advance for your help

Ah ok. I understand now. I thought you wanted to save a picture of the GUI. You should create a script and save the save programmatically. TCanvas has a SaveAS method.

Hi,

You can use the interactive feature of the Canvas to save them or alternatively you can
get the list of cavas from examples using gROOT->GetListOfCanvases() and then from there you can get the desired Canvas and call TCanvas::SaveAs

Lorenzo