# Space between subplots

**URL:** <https://discourse.julialang.org/t/space-between-subplots/93897>\
**Category:** New to Julia\
**Tags:** plots, gr\
**Created:** [February 1, 2023, 11:33pm UTC](https://discourse.julialang.org/t/space-between-subplots/93897 "2023-02-01T23:33:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [February 1, 2023, 11:54pm UTC](https://discourse.julialang.org/t/space-between-subplots/93897/2 "2023-02-01T23:54:38Z")

</div>

If you want to pass the margins in the last command, I would recommend using a matrix (or row-vector in this case) to cover all subplots. Note that negative margins are allowed. AFAIK, a big limitation of Plots.jl is that all this is achieved by trial and error.

```julia
using Plots, Measures; gr()
plt1 = plot(rand(10))
plt2 = plot(rand(10); yformatter=_->"")
plt = plot(plt1, plt2, layout=(1,2), left_margin=[5mm -8mm])

```

---

_[View the full topic](https://discourse.julialang.org/t/space-between-subplots/93897)._
