I’m trying to make a recipe for multiple axis plot, but I don’t know how. The twinx() keyword does not work.
Here is the recipe i’m working on.
I’d like to have another one or more axis to visualize this data in a better way
@userplot espplott
@recipe function f(h::espplott;
n=15, stg=false, fq=false)
Esp, x = h.args
CapRange, HeadRef, EspPower, η, Cone, Stages, Freq = EspPerformance(Esp,ns=n,stgs=stg, fqs=fq)
title := " ESP Performance Curve \n $(Esp.Manufacter) Series $(Esp.Series) Model $(Esp.Model) \n at $(Freq) Hz and $(Stages) Stages"
titlefontsize := 8
xlabel := "Liquid Rate [bbl/d]"
legend := :topright
@series begin
seriestype := :path
linewidth := 2
linecolor := :blue
label := "Head"
ylabel := "Head [ft] & Efficiency [%]"
CapRange, HeadRef
end
@series begin
seriestype := :path
linewidth := 1
linecolor := :black
label := "Efficiency"
CapRange, η
end
@series begin
seriestype := :vline
linewidth := 1
linestyle := :dash
linecolor := :red
Cone.caps
end
#
@series begin
seriestype := :path
link := :x
linewidth := 2
linecolor := :darkgreen
CapRange,EspPower
end
end