# Multiple Subplots

**URL:** <https://scilab.discourse.group/t/multiple-subplots/963>\
**Category:** Graphics and plotting\
**Created:** [June 5, 2025, 3:40pm UTC](https://scilab.discourse.group/t/multiple-subplots/963 "2025-06-05T15:40:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pascal](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/pascal/32/40_2.png) [@pascal](https://scilab.discourse.group/u/pascal)\
**Post date:** [June 5, 2025, 3:40pm UTC](https://scilab.discourse.group/t/multiple-subplots/963/1 "2025-06-05T15:40:18Z")

</div>

i have a problem with plotting multiple subplots , causing to show x and y axis with newaxces even if off and no on the same bases.  
How to correct the axes?

M.f.G. Pascal

Here is the code  
[PICV.sci](https://scilab.discourse.group/uploads/short-url/umpWhiMCtlQ422bvasgsNFI2ZsY.sci) (20.9 KB)

---

<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:** [June 5, 2025, 4:01pm UTC](https://scilab.discourse.group/t/multiple-subplots/963/2 "2025-06-05T16:01:13Z")

</div>

Hello,

You forgot to specify the newly created axes `b` as first parameter of the subsequent plot call and the further reference to `gca()` is in fact `b`:

```auto
b=newaxes();
plot(b,Dial,dpmin);
b.x_location ="bottom";
b.y_location ="right";
b.filled="off";
b.axes_bounds = a.axes_bounds;
b.data_bounds=[min(Dial),min(dpmin);max(Dial),max(dpmin)]
b.axes_visible=["off","on","off"]
b.children.children(1).thickness=2;
b.children.children(1).foreground=13;
ylabel("$dpmin\ [kPa]$","fontsize",2);

```

S.

---

<div class="post-metadata">

**Author:** ![pascal](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/pascal/32/40_2.png) [@pascal](https://scilab.discourse.group/u/pascal)\
**Post date:** [June 5, 2025, 4:10pm UTC](https://scilab.discourse.group/t/multiple-subplots/963/3 "2025-06-05T16:10:53Z")

</div>

i have done this but on my windows laptop it is still messy, what do i have not seen?  
[PICV.sci](https://scilab.discourse.group/uploads/short-url/lU4CyhirdHix1PXkzzGFaBBmBh1.sci) (23.9 KB)

---

<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:** [June 5, 2025, 7:35pm UTC](https://scilab.discourse.group/t/multiple-subplots/963/4 "2025-06-05T19:35:06Z")

</div>

all the axes adjustments have to be done after the plot, like I did above.

S.

---

<div class="post-metadata">

**Author:** ![pascal](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/pascal/32/40_2.png) [@pascal](https://scilab.discourse.group/u/pascal)\
**Post date:** [June 6, 2025, 5:43am UTC](https://scilab.discourse.group/t/multiple-subplots/963/5 "2025-06-06T05:43:11Z")

</div>

Done, but still some deviations of axes on my laptop with windows 11  
[PICV.sci](https://scilab.discourse.group/uploads/short-url/4DQHlZc16JnByfrpGEFE1kS2E93.sci) (24.1 KB)

---

<div class="post-metadata">

**Author:** ![pascal](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/pascal/32/40_2.png) [@pascal](https://scilab.discourse.group/u/pascal)\
**Post date:** [June 6, 2025, 6:58am UTC](https://scilab.discourse.group/t/multiple-subplots/963/6 "2025-06-06T06:58:04Z")

</div>

now it is good, do not know, some how something else has interrupted the process. Many thanks?

---

<div class="post-metadata">

**Author:** ![pascal](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/pascal/32/40_2.png) [@pascal](https://scilab.discourse.group/u/pascal)\
**Post date:** [June 6, 2025, 7:01am UTC](https://scilab.discourse.group/t/multiple-subplots/963/7 "2025-06-06T07:01:52Z")

</div>

But now i see that margins are not exact

---

<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:** [June 6, 2025, 8:04am UTC](https://scilab.discourse.group/t/multiple-subplots/963/8 "2025-06-06T08:04:33Z")

</div>

You are right, I have created an issue: [Axes limits are incorrectly computed when axes\_visible is off (#17449) · Issues · scilab / scilab · GitLab](https://gitlab.com/scilab/scilab/-/issues/17449)
