Hello all,
I am working on a plot with two y-axis. The plot is showing how a quantity is changing over time and I would like to have on the left axis its nominal value and on the right axis the percentage variation.
Now, with these simple lines I am able to produce the desired plot:
ttime = 0:10
nominal = exp.(-ttime/2)
percentace = 100*(nominal .- nominal[1])/nominal[1]
plot(ttime, nominal,lw=2,label="nominal")
plot!(gridalpha=0.3)
xlabel!("Time")
ylabel!("Nominal")
axis2 = twinx()
ylims!(axis2,100*(ylims()[1]-nominal[1])/nominal[1],100*(ylims()[2]-nominal[1])/nominal[1])
ylabel!(axis2,"Percentage")
However, the final plot misses any horizontal grid while I would like to keep it with the reference of the left y-axis values:
Can anybody help here?