Skip to content

Commit 4a64a3c

Browse files
docs: use idxs instead of vars for plotting in tutorials
1 parent a14f6d7 commit 4a64a3c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/src/tutorials/custom_component.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Plots.plot(sol[C1.v], sol[C2.v], title = "Chaotic Attractor", label = "",
131131
Plots.savefig("chua_phase_plane.png")
132132
nothing # hide
133133
134-
Plots.plot(sol; vars = [C1.v, C2.v, L.i],
134+
Plots.plot(sol; idxs = [C1.v, C2.v, L.i],
135135
labels = ["C1 Voltage in V" "C1 Voltage in V" "Inductor Current in A"])
136136
Plots.savefig("chua.png")
137137
nothing # hide

docs/src/tutorials/rc_circuit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ rc_eqs = [connect(constant.output, source.V)
3131
sys = structural_simplify(rc_model)
3232
prob = ODAEProblem(sys, Pair[], (0, 10.0))
3333
sol = solve(prob, Tsit5())
34-
plot(sol, vars = [capacitor.v, resistor.i],
34+
plot(sol, idxs = [capacitor.v, resistor.i],
3535
title = "RC Circuit Demonstration",
3636
labels = ["Capacitor Voltage" "Resistor Current"])
3737
savefig("plot.png");

docs/src/tutorials/thermal_model.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ sol = solve(prob, Tsit5())
3535
T_final_K = sol[(mass1.T * C1 + mass2.T * C2) / (C1 + C2)]
3636
3737
plot(title = "Thermal Conduction Demonstration")
38-
plot!(sol, vars = [mass1.T, mass2.T], labels = ["Mass 1 Temperature" "Mass 2 Temperature"])
38+
plot!(sol, idxs = [mass1.T, mass2.T], labels = ["Mass 1 Temperature" "Mass 2 Temperature"])
3939
plot!(sol.t, T_final_K, label = "Steady-State Temperature")
4040
savefig("thermal_plot.png");
4141
nothing; # hide

0 commit comments

Comments
 (0)