Question: How to set defaut options on all root sessions

Hi there,

Does anyone knows if there is a possibility to set a few options automatically in any root session?
For example:

  • I would like to always draw Ticks on X and Y as a default option. Without needing to use “gPad->SetTicks(1,1)” command.

  • Or (this would be very good) the TGraph option SetEditable marked as kFALSE as default. (I don’t understand why this is not the default already).

Thanks in advance


Please read tips for efficient and successful posting and posting code

_ROOT Version: 6.20/00
Platform: Ubuntu 18.04
_Compiler: gcc 7.5.0 (I believe)


https://root.cern.ch/root/htmldoc/guides/users-guide/ROOTUsersGuide.html#logon-and-logoff-scripts

1 Like

Thank you very much! This is exactly what I was looking for :slight_smile:
The rootlogon.C and the .rootrc works just fine.

But I cannot see a way to automatically set TGraph as not editable :frowning:

Cheers,
Henrique

I dug into TGraph’s code and it seems impossible. You can always inherent from TGraph and set it there your selves. But otherwise there seems no way.

TGraph::SetEditable is an option to be set on individual TGraphs not a global one for all the TGraphs

Thanks @marty1885 and @couet for your replies.