Dear all,
I have a litte problem in plot a graph using a layout: I would like each legend in each graph, but this not happen, as we can see:
using DifferentialEquations
using Plots
plotly()
function SIR!(du,u,p,t)
du[1] = -p[1]*u[1]*u[2]
du[2] = p[1]*u[1]*u[2] - p[2]*u[2]
du[3] = p[2]*u[2]
end
p = [0.8;0.2]
u0 = [0.9;0.1;0.0]
tspan = (0.0,50.0)
prob = ODEProblem(SIR!,u0,tspan,p)
sol = solve(prob)
plot(sol,linewidth=2,xaxis="t",layout=(3,1),color=["red" "green" "blue"],label=["S(t)" "I(t)" "R(t)"])
Anyone can help me please?