Hi sorry, hopefully I can explain a bit better. When I run the following code (your example applied to my data)
a, b, c, d = extrema(sol[circ_sys.MV.Δp])..., extrema(sol[circ_sys.MV.q])...
α = -b/a
c * d ≥ 0 && (c = -d/α)
β = -d/c
α > β ? d = -α*c : c = -d/α
plot(sol, idxs=circ_sys.MV.Δp, ylims=(a,b), c=:blue, framestyle=:zerolines, ylabel="u1", yguidefontcolor=:blue, legend=:topright)
plot!(twinx(), sol, idxs=circ_sys.MV.q, ylims=(c,d), c=:red, grid=true, xlabel="", ylabel="u2", yguidefontcolor=:red, legend=:bottomleft)
I get the following graph
Here the black line for the x-axis is where I want it to be (at y=0), but I would like to add a black line at the u1 y-axis. In order to do this, I tried to get rid of the framestyle=:zerolines
parameter in the first plot() command, resulting in the following plot commands:
plot(sol, idxs=circ_sys.MV.Δp, ylims=(a,b), c=:blue, ylabel="u1", yguidefontcolor=:blue, legend=:topright)
plot!(twinx(), sol, idxs=circ_sys.MV.q, ylims=(c,d), c=:red, grid=true, xlabel="", ylabel="u2", yguidefontcolor=:red, legend=:bottomleft)
And gives the following graph:
This has the black line at the u1 y-axis that I want, however the the black x-axis is no longer at the y=0 line.
Is there a way of resolving this? I see that in the plot you have as an example, this black y-axis line is there, so I don’t know why this is not working for me.
Thanks again