# Increase margin of combined plot made out of subplots with Plots.jl

**URL:** <https://discourse.julialang.org/t/increase-margin-of-combined-plot-made-out-of-subplots-with-plots-jl/135270>\
**Category:** Visualization\
**Tags:** plotting, plots\
**Created:** [January 26, 2026, 9:12am UTC](https://discourse.julialang.org/t/increase-margin-of-combined-plot-made-out-of-subplots-with-plots-jl/135270 "2026-01-26T09:12:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fourier](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fourier/32/38176_2.png) [@Fourier](https://discourse.julialang.org/u/Fourier)\
**Post date:** [January 26, 2026, 9:12am UTC](https://discourse.julialang.org/t/increase-margin-of-combined-plot-made-out-of-subplots-with-plots-jl/135270/1 "2026-01-26T09:12:06Z")

</div>

I am plotting multiple plots in a combined plot like this:

```julia-auto
using Plots
using Plots.Measures: mm

plots = Vector{Any}()
for (i,j) in Iterators.product(1:4, 1:4)
    p = scatter(rand(100), xlabel="X-axis $i,$j", ylabel="Y-axis $i,$j", title="Plot $i,$j")
    push!(plots, p)
end
plot(plots..., layout=(4,4), size = (2480, 3508) .÷ 4)

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/a/4a5a27325289d64ba9eaf6ecd0cc75148d5c1e40.jpeg)

However as can be seen the labels for the axes are cut off.

Therefore I would like to increase the margin on the left.

However when I use the `margins` keyword (or similar) like this:

```julia-auto
plot(plots..., layout=(4,4),size = (2480, 3508) .÷ 4, left_margin=15mm, bottom_margin=15mm)

```

it will increase the margin of all subplots:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/3/6/3641dc1800e61d881811ee4627988acd33b1de25.jpeg)

I actually intend to change the margin of the total, outside plot. So how could I fix this?

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [January 26, 2026, 2:18pm UTC](https://discourse.julialang.org/t/increase-margin-of-combined-plot-made-out-of-subplots-with-plots-jl/135270/2 "2026-01-26T14:18:42Z")

</div>

> [@Fourier](#):
>
> ```julia-auto
> plot(plots..., layout=(4,4), size = (2480, 3508) .÷ 4)
> 
> ```

Maybe change the margins only of the first and last subplots, i. e.:

```julia-auto
plot!(left_margin=15mm, top_margin=15mm, subplot=1)
plot!(bottom_margin=15mm, right_margin=15mm, subplot=16)

```

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [January 26, 2026, 2:23pm UTC](https://discourse.julialang.org/t/increase-margin-of-combined-plot-made-out-of-subplots-with-plots-jl/135270/3 "2026-01-26T14:23:00Z")

</div>

This is probably related, to improve the relationship with the title: [Inserting margins above plot title](https://discourse.julialang.org/t/inserting-margins-above-plot-title/82801)
