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

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

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…

6 Likes