Skip to content

jsroot and JupyterLab #166

@wgseligman

Description

@wgseligman

I have no problems using jsroot in jupyter. I have no problems making plots in general in jupyter or jupyterlab. But when I use jsroot in python within JupyterLab; e.g.

import ROOT
%jsroot on
canvas = ROOT.TCanvas()
test = ROOT.TH1D("example","example",100,-5.,5.)
test.FillRandom("gaus",100000)
test.Draw()
canvas.Draw()

or in the ROOT C++ kernel, e.g.,

%jsroot on
TCanvas my_canvas("canvas","canvas title",800,600);
TH1D example("example","example histogram",100,-3,3);
example.FillRandom("gaus",10000);
example.Draw();
my_canvas.Draw();

I just see a blank area in the output that's the same size of the plot I expect. If I turn %jsroot off in both the above examples, the plot is produced. If I use the same notebooks in "plain old jupyter", the plots appear with %jsroot on.

I've tried this on two different machines/OSes with the same results:
OS - CentOS 7
Python version - 3.6.5
ROOT version - 6.14.02

OS - Mac OS 10.11.6
Python version - 3.6.6
ROOT version - 6.14.00

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions