# Which size for subplots (Plots.jl/GR)

**URL:** <https://discourse.julialang.org/t/which-size-for-subplots-plots-jl-gr/53936>\
**Category:** General Usage\
**Tags:** plots, gr\
**Created:** [January 25, 2021, 9:29pm UTC](https://discourse.julialang.org/t/which-size-for-subplots-plots-jl-gr/53936 "2021-01-25T21:29:16Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [March 25, 2021, 8:58pm UTC](https://discourse.julialang.org/t/which-size-for-subplots-plots-jl-gr/53936/5 "2021-03-25T20:58:59Z")

</div>

Using the `plotly()` backend and the margin attribute, decent results are obtained:

```julia
using Plots; plotly()
using Plots.Measures

function make_plot(N,M)
    plotsize = (M*400,N*400)
    plts = [plot(rand(10), xlabel="X-axis ($i)", ylabel="Y-axis ($i)", color=i,
         left_margin = 15mm, legend=false, plotsize=(400,400)) for i in 1:N*M]
    plot(plts..., layout=(N,M), size=plotsize)
end

make_plot(1,12)

```

_PS: there are 12 subplots but truncated here for better visualization (cursor shows reading on curve):_

 ![plotly_1x12_with_15mm_left_margin](https://global.discourse-cdn.com/julialang/original/3X/7/2/72e1267aa80fd9a367904965169aa0c810da0aa6.jpeg)

---

_[View the full topic](https://discourse.julialang.org/t/which-size-for-subplots-plots-jl-gr/53936)._
