Can I set the fault file type to be saved in ".root"?

Hi, rooter,

When I open a Canvas and save a plot into a file, on the pop-up, the default type is “.ps”.
I don’t how many people prefer to save it in that type, for me, most of the cases I need to save it in “.root”.
After googling, I can’t find a solution.

Can anybody here tell me how to set it up please ?

Thanks !

Best,
Junhui

Hi Junhui,

There is actually no way of changing the default type. But note that when once you save in one another type, this will stay the default (for the current canvas)

Cheers, Bertrand.

[quote=“bellenot”]Hi Junhui,

There is actually no way of changing the default type. But note that when once you save in one another type, this will stay the default (for the current canvas)

Cheers, Bertrand.[/quote]
Could we imagine that this feature be added in ROOT? For example, we could specify which extension would be set by default in the rootlogon.

[quote=“pamputt”]Could we imagine that this feature be added in ROOT? [/quote]Obviously we can… I add it in my to-do list.

Cheers, Bertrand.

Thanks a lot, Bertrand !

Best,
Junhui

You’re welcome. I will introduce the changes soon.
And BTW, in the meanwhile, you know you can type directly the file name with its extension, without having to select the type in the combo box (which is only there to filter the files in the file view), right?

Cheers, Bertrand.

Hi,

This has just been implemented in the git master and v5-34-00-patches branch of ROOT. There is now a “Canvas.SaveAsDefaultType” option in the rootrc file, allowing to specify the default file format to be used in the TCanvas’ “Save As” file dialog (which is pdf by default)

Cheers, Bertrand.