# Disable jsroot by default in Jupyter

**URL:** <https://root-forum.cern.ch/t/disable-jsroot-by-default-in-jupyter/63741>\
**Category:** ROOT\
**Tags:** python\
**Created:** [June 16, 2025, 3:52pm UTC](https://root-forum.cern.ch/t/disable-jsroot-by-default-in-jupyter/63741 "2025-06-16T15:52:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![EdwinYZ](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/edwinyz/32/36503_2.png) [@EdwinYZ](https://root-forum.cern.ch/u/EdwinYZ)\
**Post date:** [June 16, 2025, 3:52pm UTC](https://root-forum.cern.ch/t/disable-jsroot-by-default-in-jupyter/63741/1 "2025-06-16T15:52:01Z")

</div>

### Main issue

Hi,

I would like to ask whether there is a way to disable jsroot (i.e. `%jsroot off`) by default when opening a new notebook in Jupyter.

I remember in the older versions of ROOT, `%jsroot off` was the default setting. But with the newer versions, somehow the default setting was changed and I have to add `%jsroot off` each time when opening a new notebook, which is sometimes really annoying.

#### Why to disable jsroot in jupyter?

Images with jsroot turned on cannot be displayed properly in Github or Gitlab.

_ROOT Version:_ 6.34.08  
_Platform:_ Fedora 42  
_Compiler:_ gcc 15

* * *

---

<div class="post-metadata">

**Author:** ![linev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2bfe46/32.png) [@linev](https://root-forum.cern.ch/u/linev)\
**Post date:** [June 16, 2025, 5:56pm UTC](https://root-forum.cern.ch/t/disable-jsroot-by-default-in-jupyter/63741/2 "2025-06-16T17:56:57Z")

</div>

Hi,

As far as I can say such default mode cannot be changed.  
May be @vpadulan has better idea.

Meanwhile - can you show me where such stored pages do not work?  
Probably we can improve jsroot embedding and solve your problem.

Regards,  
Sergey

---

<div class="post-metadata">

**Author:** ![EdwinYZ](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/edwinyz/32/36503_2.png) [@EdwinYZ](https://root-forum.cern.ch/u/EdwinYZ)\
**Post date:** [June 17, 2025, 11:33am UTC](https://root-forum.cern.ch/t/disable-jsroot-by-default-in-jupyter/63741/3 "2025-06-17T11:33:58Z")

</div>

Hi,

Thanks for your reply. Sorry that I didn’t notice the plot with “jsroot on” works properly with newer versions.

But I forgot mention another serious problem of jsroot: when I plot a large histogram, which has a large number of bins, this could make jupyter very slow. Things could get much worse when plotting multiple large histograms in one single notebook. At some point, it became unusable and I had to turn off the jsroot.

---

<div class="post-metadata">

**Author:** ![linev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2bfe46/32.png) [@linev](https://root-forum.cern.ch/u/linev)\
**Post date:** [June 17, 2025, 11:38am UTC](https://root-forum.cern.ch/t/disable-jsroot-by-default-in-jupyter/63741/4 "2025-06-17T11:38:25Z")

</div>

> [@EdwinYZ](#):
>
> when I plot a large histogram, which has a large number of bins, this could make jupyter very slow.

Yes, it is drawback of using JSROOT.  
Complete histogram must be stored in HTML as JSON - and it can be very large for histograms with many bins. To optimize this - you can rebin histograms before drawing them.

Grate that it works now for you!

---

<div class="post-metadata">

**Author:** ![EdwinYZ](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/edwinyz/32/36503_2.png) [@EdwinYZ](https://root-forum.cern.ch/u/EdwinYZ)\
**Post date:** [June 17, 2025, 12:40pm UTC](https://root-forum.cern.ch/t/disable-jsroot-by-default-in-jupyter/63741/5 "2025-06-17T12:40:27Z")

</div>

It would be really nice if there is a rolling back to make jsroot off in the new releases, or at least give us an option in .rootrc to turn it off when opening a new notebook.

---

<div class="post-metadata">

**Author:** ![linev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2bfe46/32.png) [@linev](https://root-forum.cern.ch/u/linev)\
**Post date:** [June 17, 2025, 12:44pm UTC](https://root-forum.cern.ch/t/disable-jsroot-by-default-in-jupyter/63741/6 "2025-06-17T12:44:26Z")

</div>

I create [issue](https://github.com/root-project/root/issues/19068) on github.  
You can add comments there.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [July 1, 2025, 12:45pm UTC](https://root-forum.cern.ch/t/disable-jsroot-by-default-in-jupyter/63741/7 "2025-07-01T12:45:24Z")

</div>

Closed on July 1, 2025, 12:45pm UTC

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