# Hot to maintain equal plot sizes of subplot when using e.g. \`legend=:outertop\`?

**URL:** <https://discourse.julialang.org/t/hot-to-maintain-equal-plot-sizes-of-subplot-when-using-e-g-legend-outertop/104637>\
**Category:** Visualization\
**Tags:** plotting\
**Created:** [October 5, 2023, 11:48pm UTC](https://discourse.julialang.org/t/hot-to-maintain-equal-plot-sizes-of-subplot-when-using-e-g-legend-outertop/104637 "2023-10-05T23:48:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Post date:** [October 5, 2023, 11:48pm UTC](https://discourse.julialang.org/t/hot-to-maintain-equal-plot-sizes-of-subplot-when-using-e-g-legend-outertop/104637/1 "2023-10-05T23:48:29Z")

</div>

MWE:

```julia
using Plots
p1 = plot(x->x^2, label = "my curve")
plot(x->x^1, label = "A curve")
plot!(x->x^1, label = "Curve 1")
plot!(x->x^2, label = "Curve 2")
plot!(x->x^3, label = "Curve 3")
plot!(x->x^4, label = "Curve 4")
p2 = plot!(x->x^5, label = "Curve 5")

plot(p1, p2, legend=:outertop)

```

![image](https://global.discourse-cdn.com/julialang/original/3X/5/a/5ab828bef1e2f37ebff28f9c272627ff443cb7e3.png)  
Here, I would like the two plots to display of equal size (they use the same axises and should be compared). When the legend is on the outside, this squeezes the plots differently
