Plots using jsROOT not being displayed / remain blank

Dear all,

We are providing a JupyterLab based notebooks service to our users. Once a user connects to this service, a notebook server is spawned inside a Docker container, running either in a VM or in a physical machine.
We are providing ROOT based kernels, as well as Python + PyROOT kernels. I am trying to use JsROOT in the notebooks, but up to now I failed to do it.

Basically I start a Python based kernel and import ROOT. if I want to switch to JsROOT (using the magic %jsroot) and redraw a plot, then the plot disappears (and the plot area remains blank).

I checked the logs to check potential missing dependancies or similar problems, but found nothing. It is like everything is running as expected, but JupyterLab cannot display the plot.

Do I have something else to provide or configure to make JsROOT work in such environment? In particular, do I have to expose ports or something to be able to correctly display the plots?

Thanks!
Regards,

SĂ©bastien


Please read tips for efficient and successful posting and posting code

_ROOT Version: 6.20.00 (6.18.00 and 6.22.00 as well)
_Platform: CentOS 7.9.2009
_Compiler: GCC 7.2.1


Hi SĂ©bastien,

There are differences how JSROOT handled in iPython notebooks.
In older ROOT versions (like 6.18 and 6.20) JSROOT from https://root.cern/js/notebook should be used. In newer ROOT versions (like 6.22 or 6.24) iPython should use JSROOT which delivered with ROOT itself.

Can you check console of your web browser? It should has message like:

Set JSROOT.source_dir to <location>, <version>

Or maybe it fails to load JSROOT completely.

Also try to start notebooks with command rootnb - it provides proper configuration.

Regards,
Sergey

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.