I am trying to use plotlegend for solutions I've obtained using NDSolve. I have
Plot[{a[z], b[z]} /. sol , {z, 0, L}, PlotLegends -> {"1", "2"}]
It doesn't work because I am using ./sol
How can I fix this?
Thanks in advance...
I am trying to use plotlegend for solutions I've obtained using NDSolve. I have
Plot[{a[z], b[z]} /. sol , {z, 0, L}, PlotLegends -> {"1", "2"}]
It doesn't work because I am using ./sol
How can I fix this?
Thanks in advance...
Evaluate the list first:
Plot[Evaluate[{a[z], b[z]} /. sol] , {z, 0, L}, PlotLegends -> {"1", "2"}]
Evaluateis required. DoesPlot[Evaluate[{a[z], b[z]}/.sol], {z, 0, L}, PlotLegends -> {"1", "2"}]work? – MassDefect May 03 '19 at 15:53