Skip to content

Commit 0682029

Browse files
authored
Merge pull request #5 from control-toolbox/4-general-update-with-ctmodels-v036
up plots
2 parents e56d32a + 662ea47 commit 0682029

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Tutorials"
22
uuid = "cb10daa6-a5e5-4c25-a171-ae181b8ea3c9"
33
authors = ["Olivier Cots <olivier.cots@toulouse-inp.fr>"]
4-
version = "0.1.0"
4+
version = "0.1.1"
55

66
[compat]
77
julia = "1.10"

docs/src/tutorial-continuation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ plt_obj = plot(Tmax_list, obj_list;
133133
xlabel="Maximal thrust (Tmax)",
134134
ylabel="Maximal altitude r(tf)")
135135
136-
plt_sol = plot(sol0; solution_label="(Tmax = "*string(Tmax_list[1])*")")
137-
plot!(plt_sol, sol; solution_label="(Tmax = "*string(Tmax_list[end])*")")
136+
plt_sol = plot(sol0; label="(Tmax = "*string(Tmax_list[1])*")")
137+
plot!(plt_sol, sol; label="(Tmax = "*string(Tmax_list[end])*")")
138138
139139
layout = grid(2, 1, heights=[0.2, 0.8])
140140
plot(plt_obj, plt_sol; layout=layout, size=(800, 1000), leftmargin=5mm)

docs/src/tutorial-discretisation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,22 @@ x_style = (legend=:none,)
6262
p_style = (legend=:none,)
6363
6464
sol_trapeze = solve(ocp; tol=1e-8)
65-
plt = plot(sol_trapeze; solution_label="trapeze", state_style=x_style, costate_style=p_style)
65+
plt = plot(sol_trapeze; label="trapeze", state_style=x_style, costate_style=p_style)
6666
6767
sol_midpoint = solve(ocp, disc_method=:midpoint; tol=1e-8)
68-
plot!(plt, sol_midpoint; solution_label="midpoint", state_style=x_style, costate_style=p_style);
68+
plot!(plt, sol_midpoint; label="midpoint", state_style=x_style, costate_style=p_style);
6969
7070
sol_euler = solve(ocp, disc_method=:euler; tol=1e-8)
71-
plot!(plt, sol_euler; solution_label="euler", state_style=x_style, costate_style=p_style);
71+
plot!(plt, sol_euler; label="euler", state_style=x_style, costate_style=p_style);
7272
7373
sol_euler_imp = solve(ocp, disc_method=:euler_implicit; tol=1e-8)
74-
plot!(plt, sol_euler_imp; solution_label="euler implicit", state_style=x_style, costate_style=p_style);
74+
plot!(plt, sol_euler_imp; label="euler implicit", state_style=x_style, costate_style=p_style);
7575
7676
sol_gl2 = solve(ocp, disc_method=:gauss_legendre_2; tol=1e-8)
77-
plot!(plt, sol_gl2; solution_label="gauss legendre 2", state_style=x_style, costate_style=p_style);
77+
plot!(plt, sol_gl2; label="gauss legendre 2", state_style=x_style, costate_style=p_style);
7878
7979
sol_gl3 = solve(ocp, disc_method=:gauss_legendre_3; tol=1e-8)
80-
plot!(plt, sol_gl3; solution_label="gauss legendre 3", state_style=x_style, costate_style=p_style);
80+
plot!(plt, sol_gl3; label="gauss legendre 3", state_style=x_style, costate_style=p_style);
8181
8282
plot(plt, size=(800, 800))
8383
```

docs/src/tutorial-goddard.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ nothing # hide
109109
and plot the solution
110110

111111
```@example main
112-
plt = plot(direct_sol, solution_label="(direct)", size=(800, 800))
112+
plt = plot(direct_sol, label="direct", size=(800, 800))
113113
```
114114

115115
## [Structure of the solution](@id tutorial-goddard-structure)
@@ -359,7 +359,7 @@ We plot the solution of the indirect solution (in red) over the solution of the
359359
f = f1 * (t1, fs) * (t2, fb) * (t3, f0) # concatenation of the flows
360360
flow_sol = f((t0, tf), x0, p0) # compute the solution: state, costate, control...
361361
362-
plot!(plt, flow_sol, solution_label="(indirect)")
362+
plot!(plt, flow_sol, label="indirect")
363363
```
364364

365365
## References

0 commit comments

Comments
 (0)