# How to keep grid drawn even on smaller screens with JSROOT?

**URL:** <https://root-forum.cern.ch/t/how-to-keep-grid-drawn-even-on-smaller-screens-with-jsroot/59555>\
**Category:** ROOT\
**Tags:** jsroot\
**Created:** [June 5, 2024, 1:35pm UTC](https://root-forum.cern.ch/t/how-to-keep-grid-drawn-even-on-smaller-screens-with-jsroot/59555 "2024-06-05T13:35:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![graduta](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/g/35a633/32.png) [@graduta](https://root-forum.cern.ch/u/graduta)\
**Post date:** [June 5, 2024, 1:35pm UTC](https://root-forum.cern.ch/t/how-to-keep-grid-drawn-even-on-smaller-screens-with-jsroot/59555/1 "2024-06-05T13:35:51Z")

</div>

Hi,

We have a few users in ALICE that consider it critical to draw multiple plots in the same histogram (in this example, 16 of them). This works very well when using a normal/large screen, but when they use a smaller screen or browser size, JSROOT will not display the grid anymore.  
I have tried to pass as drawing option `gridx`, `gridy` but I still do not get those drawn.

Is there a drawing option that the users could set to always display the grid, even in smaller sizes?

I have attacked one of the ROOT objects in question and some screenshots with the behaviour.

JSROOT version: 7.7.1

Thank you,  
George

Grid Missing Screenshot:

 ![grid missing](https://root-forum.cern.ch/uploads/default/original/3X/2/9/2907f9e74b9ec7d1abd388ad571b4c86d120b8f4.png)

Grid Present Screenshot:

 ![grid present](https://root-forum.cern.ch/uploads/default/original/3X/7/d/7d88986b9286985acb9c45fbc5869c01288c139e.png)

[TObject\_1663698202843.root](https://root-forum.cern.ch/uploads/short-url/dBzdr0yhlXvZeoTZl2ZZrzIWU27.root) (8 KB)

---

<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 5, 2024, 1:43pm UTC](https://root-forum.cern.ch/t/how-to-keep-grid-drawn-even-on-smaller-screens-with-jsroot/59555/2 "2024-06-05T13:43:45Z")

</div>

Hi George,

Yes there is [settings.SmallPad](https://root.cern/js/latest/jsdoc/settings.html#.SmallPad) object.

If pad size smaller then many components (axis labels, ticks, grids) will not be drawn.

To change it:

```auto
import { settings } from 'https://root.cern/js/latest/modules/core.mjs';

settings.SmallPad.width = settings.SmallPad.height = 5;

```

---

<div class="post-metadata">

**Author:** ![graduta](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/g/35a633/32.png) [@graduta](https://root-forum.cern.ch/u/graduta)\
**Post date:** [June 6, 2024, 12:37pm UTC](https://root-forum.cern.ch/t/how-to-keep-grid-drawn-even-on-smaller-screens-with-jsroot/59555/3 "2024-06-06T12:37:05Z")

</div>

Hi @linev ,

Thank you for the hint! I confirm it is what I needed.

Have a nice day,  
George

---

<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:** [June 20, 2024, 12:37pm UTC](https://root-forum.cern.ch/t/how-to-keep-grid-drawn-even-on-smaller-screens-with-jsroot/59555/4 "2024-06-20T12:37:05Z")

</div>

Closed on June 20, 2024, 12:37pm UTC

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