# Margins controls for PyPlot

**URL:** <https://discourse.julialang.org/t/margins-controls-for-pyplot/93759>\
**Category:** Visualization\
**Tags:** pyplot\
**Created:** [January 30, 2023, 10:05am UTC](https://discourse.julialang.org/t/margins-controls-for-pyplot/93759 "2023-01-30T10:05:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luigi\_Marongiu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/luigi_marongiu/32/7909_2.png) [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Post date:** [January 30, 2023, 10:05am UTC](https://discourse.julialang.org/t/margins-controls-for-pyplot/93759/1 "2023-01-30T10:05:24Z")

</div>

Hello  
what are the Julia PyPlot equivalents to R’s margin parameters `oma` and `mai`?  
Thank you

---

<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:** [January 30, 2023, 1:07pm UTC](https://discourse.julialang.org/t/margins-controls-for-pyplot/93759/2 "2023-01-30T13:07:11Z")

</div>

Hi.  
This is not really a Julia question and quick googling provides workable answers. See if the simple example below helps. It brings the left/right margins in by 30% and the top/bottom margins in by 20%:

```julia
using PyPlot
x = 0:0.1:3π
y = sin.(x)
PyPlot.plot(x,y,label="sin(x)")
plt.subplots_adjust(left=0.3, right=0.7, top=0.8, bottom=0.2)

```
