# PyPlot label\_position Y-axis in Julia

**URL:** <https://discourse.julialang.org/t/pyplot-label-position-y-axis-in-julia/18354>\
**Category:** General Usage\
**Tags:** pyplot\
**Created:** [December 6, 2018, 1:03am UTC](https://discourse.julialang.org/t/pyplot-label-position-y-axis-in-julia/18354 "2018-12-06T01:03:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Romero\_Azzalini](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/romero_azzalini/32/10325_2.png) [@Romero\_Azzalini](https://discourse.julialang.org/u/Romero_Azzalini)\
**Post date:** [December 6, 2018, 1:03am UTC](https://discourse.julialang.org/t/pyplot-label-position-y-axis-in-julia/18354/1 "2018-12-06T01:03:38Z")

</div>

I basically want the Y label (using PyPlot) on the right side with it’s ticks. For Python I found the comand `ax.yaxis.set_label_position("right")` .

But if I do

```julia
ax=gca()
ax.yaxis.set_label_position("right")

```

or `ax[:yaxis](label_position="right")`

Julia says “type PyObject has no field yaxis” for the first case and “TypeError(”‘YAxis’ object is not callable",)" for the second case. How do I adress it correctly?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [December 6, 2018, 2:25pm UTC](https://discourse.julialang.org/t/pyplot-label-position-y-axis-in-julia/18354/2 "2018-12-06T14:25:42Z")

</div>

I haven’t used PyPlot other than through Plots.jl in a long time, but this seems to work:

```julia
using PyPlot
ax = gca()
ax[:yaxis][:set_label_position]("right")
ax[:yaxis][:label_position] # Returns "right"

```

For reference, if you wanted to do it in Plots.jl instead you could do:

```julia
using Plots
pyplot() # If you insist on the PyPlot backend

plot(rand(100), ymirror = true)

```
