# Missing gridlines for subticks

**URL:** <https://scilab.discourse.group/t/missing-gridlines-for-subticks/184>\
**Category:** Graphics and plotting\
**Created:** [October 10, 2023, 1:04pm UTC](https://scilab.discourse.group/t/missing-gridlines-for-subticks/184 "2023-10-10T13:04:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skogen](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Skogen](https://scilab.discourse.group/u/Skogen)\
**Post date:** [October 10, 2023, 1:04pm UTC](https://scilab.discourse.group/t/missing-gridlines-for-subticks/184/1 "2023-10-10T13:04:49Z")

</div>

Is there a way to include the subticks between the last main tick and the end of the displayed limits?

Example code:

```auto
fv=logspace(1,log10(40000));
amp=sin(fv);

plot2d('ln',fv,amp);
h1=gca();
h1.axes_visible='on';
h1.grid=[1,1];
h1.data_bounds=[20,-1;40000,1];
h1.tight_limits=1;
h1.sub_ticks=[8,0];

```

The result:

 ![gridlines](https://global.discourse-cdn.com/free1/uploads/utc/original/1X/5de224702e71a8ac6f3309e2fddb6cf611bf32cf.png)

I wish to have Scilab also plot the red lines at 20.000 and 30.000. And the same between 20 and 100, i.e. 20, 30, 40…

---

<div class="post-metadata">

**Author:** ![Skogen](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Skogen](https://scilab.discourse.group/u/Skogen)\
**Post date:** [October 10, 2023, 1:09pm UTC](https://scilab.discourse.group/t/missing-gridlines-for-subticks/184/2 "2023-10-10T13:09:18Z")

</div>

I know that i can brute force plot the lines by defining the grid with ticks.labels and ticks.location, but that should be unnecessary.

---

<div class="post-metadata">

**Author:** ![mottelet](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/mottelet/32/13_2.png) [@mottelet](https://scilab.discourse.group/u/mottelet)\
**Post date:** [October 10, 2023, 2:58pm UTC](https://scilab.discourse.group/t/missing-gridlines-for-subticks/184/3 "2023-10-10T14:58:11Z")

</div>

I am affraid this is the only way until an eventual fix.
