Hi,
I’ve been using ROOT on Windows for historical reasons and now I’d really like to move to linux and ROOT 6 but I have an issue.
On windows I use pyroot in jupyter notebooks (Windows 10, ROOT 5.34/36, Anaconda python 2.7.14, jupyter 4.3.0). My workflow includes plotting various distributions, fitting them etc. The simplest example I can think of is
from ROOT import TH1D, TCanvas
c = TCanvas('c', 'c', 1800, 0, 700, 700)
h = TH1D("gauss", "Example histogram", 100, -4., 4.)
h.FillRandom("gaus")
h.Draw()
c.Modified()
c.Update()
On windows this opens an interactive ROOT window with the histogram - I can right click on it, open a fit panel and fit it with a gaussian - no problem.
On linux (Ubuntu 18, ROOT 6.14/04, Anaconda python 3.6.5, jupyter 4.4.0) if I run the same code I don’t get any root window, the canvas and histogram are created but not drawn in a window or inline in the notebook. The closest I can get to the same behaviour on linux is the following code
from ROOT import TH1D, TCanvas, gROOT
gROOT.SetBatch(False)
c = TCanvas('c', 'c', 10, 10, 700, 700)
c.Draw()
h = TH1D("gauss", "Example histogram", 100, -4., 4.)
h.FillRandom("gaus")
h.Draw()
c.Modified()
c.Update()
Now a ROOT window is opened and the histogram is drawn but the histogram is also drawn as a png inline below the cell in the notebook. Also the ROOT window is not interactive - it has File Edit View Options Tools at the top but clicking on them does nothing. The histogram seems to be an image - clicking on it does nothing and it does not resize with the window.
Please help - I can’t think of anything else to try.
Emmett.
ps: I can run all of the scripts in root/tutorials/pyroot on both windows and linux and root windows are correctly opened and populated. So I think it must be down to different behaviour of jupyter !? Is there something simple I am missing ?
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided