jsroot and JupyterLab
See original GitHub issueI 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?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:53 (18 by maintainers)
Top Results From Across the Web
JsRoot in Jupyterlab - ROOT Forum - CERN
I am trying to make jsroot running within a Jupyter notebook (through JupyterLab). I know this is working from SWAN @CERN, but I...
Read more >JupyterLab at the Saint Petersburg State University - IOPscience
This paper describes our experience using and extending JupyterLab. ... JupyterLab JSROOT project, “jupyterlab jsroot” [software], version 0.0.2.
Read more >JupyterLab at the Saint Petersburg State University
A JavaScript library JSROOT [11] makes it possible to show the content of ROOT files in a web browser. We decided to integrate...
Read more >https://www.nevis.columbia.edu/~seligman/root-clas...
... you can use the <tt>%jsroot on</tt> magic to make plots interactive. ... "\n", " // We are in jupyterlab without require.js, directly...
Read more >(PDF) JupyterLab at the Saint Petersburg State University
JupyterLab [3] project reuses Jupyter Notebook file format and kernel ... We decided to integrate JSROOT into JupyterLab to provide users ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I guess, it is important information for @etejedor, who is maintaining
Jupyter
implementation for ROOT.Some news.
After https://github.com/root-project/root/pull/6155 and https://github.com/root-project/root/pull/6169 PRs (both are merged into the master)
jupyter notebook
andjupyter lab
works properly, including JSROOT graphics.With small adjustment in https://github.com/root-project/root/pull/6180
require.js
will be excluded fromjupyter lab
- JSROOT can be loaded directly.