# Dual y axis appears on the same side in a Pluto notebook with Plots

**URL:** https://discourse.julialang.org/t/dual-y-axis-appears-on-the-same-side-in-a-pluto-notebook-with-plots/99240
**Category:** New to Julia
**Tags:** question, plotting
**Created:** [May 22, 2023, 5:57pm UTC](https://discourse.julialang.org/t/dual-y-axis-appears-on-the-same-side-in-a-pluto-notebook-with-plots/99240 "2023-05-22T17:57:42Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![PeX](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pex/32/49986_2.png) [@PeX](https://discourse.julialang.org/u/PeX)
#### Post date: [May 22, 2023, 5:57pm UTC](https://discourse.julialang.org/t/dual-y-axis-appears-on-the-same-side-in-a-pluto-notebook-with-plots/99240/1 "2023-05-22T17:57:42Z")

</div>

I’m trying to make a plot with dual y axis using Plots in a Pluto notebook.

```julia
begin
plot(randn(100), ylabel="y1", leg=:topright)
plot!(twinx(), randn(100)*10,
    c=:red,
    ylabel="y2",
    leg=:bottomright,
    size=(600, 400))
plot!(right_bottom=10mm)
end

```

For some reason, the result is that both of them are on the left side, I can’t get it to have one of them on the right:  
 ![newplot](https://global.discourse-cdn.com/julialang/original/3X/e/5/e54d0f797a5e6e07db35cca7e4f423f4cac02da2.png)

What am I missing?

---

<div class="post-metadata">

### Author: ![rmsmsgood](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rmsmsgood/32/20544_2.png) [@rmsmsgood](https://discourse.julialang.org/u/rmsmsgood)
#### Post date: [May 23, 2023, 6:00am UTC](https://discourse.julialang.org/t/dual-y-axis-appears-on-the-same-side-in-a-pluto-notebook-with-plots/99240/2 "2023-05-23T06:00:49Z")

</div>

![1](https://global.discourse-cdn.com/julialang/original/3X/6/2/62ae1d8d0f488652b96507eff434003dd0f569f4.png)

```julia
begin
    plot(randn(100), ylabel="y1", leg=:topright)
    plot!(twinx(), randn(100)*10,
        c=:red,
        ylabel="y2",
        leg=:bottomright,
        size=(600, 400))
    plot!(right_bottom=10Plots.mm)
end

```

I have chaged `mm` to `Plots.mm`, but I guess it’s not the issue. Just restart julia session or upgrade julia version. My result is obtained in julia 1.9.0 and Plots v1.38.11.

---

<div class="post-metadata">

### Author: ![PeX](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pex/32/49986_2.png) [@PeX](https://discourse.julialang.org/u/PeX)
#### Post date: [May 24, 2023, 9:16pm UTC](https://discourse.julialang.org/t/dual-y-axis-appears-on-the-same-side-in-a-pluto-notebook-with-plots/99240/3 "2023-05-24T21:16:19Z")

</div>

I tried this and still, they are both on the same side. I upgraded both Julia and plots too.  
Not sure what is causing this, or how I can force it to be on the other side.

---

<div class="post-metadata">

### Author: ![transarcus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/transarcus/32/11186_2.png) [@transarcus](https://discourse.julialang.org/u/transarcus)
#### Post date: [August 16, 2023, 10:50pm UTC](https://discourse.julialang.org/t/dual-y-axis-appears-on-the-same-side-in-a-pluto-notebook-with-plots/99240/4 "2023-08-16T22:50:27Z")

</div>

I’m facing the same issue with pyplot in Plots.jl. Plots v1.38.17 and Julia v1.9.2.  
I think this is unique to pyplot, @PeX are you also using pyplot?  
When I switched to GR it worked as expected…

---

<div class="post-metadata">

### Author: ![JacobC](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jacobc/32/51809_2.png) [@JacobC](https://discourse.julialang.org/u/JacobC)
#### Post date: [August 23, 2023, 12:29am UTC](https://discourse.julialang.org/t/dual-y-axis-appears-on-the-same-side-in-a-pluto-notebook-with-plots/99240/5 "2023-08-23T00:29:15Z")

</div>

I’m also having the same issue, also using Pluto and Plotly. I’m a semi-beginner with Julia, I can’t just change the backend to GR() and have all my Plotly commands still work correct?
