NOvA plot style » History » Version 11
NOvA plot style¶
NOvA plots for public consumption (and preferably internal plots too) should conform to the NOvA plot style. The rootlogon macro described here provides you a good baseline to work from to adhere to the NOvA plot style.
This rootlogon can be found in the Utilities package: Utilities/rootlogon.C
When configured correctly, this runs at ROOT startup and configures various drawing options. To get this to happen, you need to edit (or create if you don't have one) the file
.rootrc in your home directory.
Put your personal copy of
rootlogon.C somewhere, and then point ROOT at it with a line like this in
Or, if you want to automatically pick up updates to this file in future, you can use this line:
However, if you want to make any local changes to some aspect, you'll need your own copy as described above.
- This macro disables the ROOT stats box. It may be difficult to get one to appear on the occasions when you actually do need one. You may need to comment out the
novaStyle->SetOptStat(0)line in this case
novaexecutable doesn't respect rootlogon files, so plots in output histogram files have the wrong style. You can uncomment the
gROOT->ForceStyle()line to attempt to restyle these plots when loaded. This may not always be what you want (eg opening someone else's plot with custom styling), so use with care.
- This rootlogon contains a function
CenterTitles(TH1*)to center the axis titles of your histogram. Call it in your macro before you draw the histogram for which the axis titles need to be centered.
- The rootlogon also contains a
Preliminary()function that draws the "NOvA preliminary" text in the example plot. Simply call it after you're done drawing your plot and before you save it.