I recently updated my laptop to Ubuntu 20, and am experiencing problems with the plots produced in ROOT. Whenever I produce plots on my laptop, several style options I set seem to be ignored/wrong. Running the same code before the OS upgrade, or currently on lxplus, or on a local cluster produces the desired output. To give an example:
I tried several versions of ROOT ( 6.20, 6.22 ), both installed by downloading the binary and also by compiling by source, yet the result is the same every time: the style options on the plot seem wrong and/or ignored. Do you have any idea what might be the cause of such an issue?
Does your code have any of SetTicks / SetTickx / SetTicky? By default, root does not draw the right-side and upper ticks, so if your macro doesn’t have SetTicks / SetTickx / SetTicky, they have to come from somewhere else (maybe .rootrc? or an included header setting a style?); if your code has those commands then the question would be why are they ignored or superseded.
The changed in style should come from somewhere.
try to run with root -n in the place it works for you. That way
you will avoid the external setting and you should get what you get in the new plot.
I am running a python script that calls ROOT, and changing it into a ROOT macro I can run in the command line usiong “root -n” will be fairly involved. Is there a way I could flag .rootrc to be ignored inside the python script? I can not seem to find a way to do this.
So if this style.py file is configuring the drawing style and is read and used correctly in the other machines, it could be that it is not being found in your new Ubuntu; try printing a message from this file (and before calling it) to know whether it is being read in the first place.
Thanks for the suggestion. I verified that indeed in all cases the style function is in fact run, both on my laptop and remotely where the plot is produced correctly. I also verified explicitly there are no code differences at all.