# Dual-axis plot breaks with multiple variables on right/secondary y-axis

**URL:** https://discourse.julialang.org/t/dual-axis-plot-breaks-with-multiple-variables-on-right-secondary-y-axis/64491
**Category:** General Usage
**Tags:** question, plotting, visualization, plots
**Created:** [July 12, 2021, 8:24am UTC](https://discourse.julialang.org/t/dual-axis-plot-breaks-with-multiple-variables-on-right-secondary-y-axis/64491 "2021-07-12T08:24:43Z")
**Posts on this page:** 1
**Showing post:** 4

<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: [July 12, 2021, 10:43am UTC](https://discourse.julialang.org/t/dual-axis-plot-breaks-with-multiple-variables-on-right-secondary-y-axis/64491/4 "2021-07-12T10:43:44Z")

</div>

Every call to `twinx()` creates a new axis, so you want to re-use the first one:

```julia
julia> axis2 = twinx();

julia> plot!(axis2, rand(10), label="v1")

julia> plot!(axis2, rand(10), label="v2")

```

But to me using the `twinx()` stuff in Plots always feels like an uphill struggle - usually once my Plots get that complicated I switch to Makie…

---

_[View the full topic](https://discourse.julialang.org/t/dual-axis-plot-breaks-with-multiple-variables-on-right-secondary-y-axis/64491)._
