Skip to content

Commit

Permalink
replace Plots with ControlPlots
Browse files Browse the repository at this point in the history
ufechner7 committed Aug 7, 2024
1 parent e7cc8ec commit 5e1e50c
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -15,8 +15,8 @@ Reexport = "1.2"
julia = "1.10"

[extras]
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
ControlPlots = "23c2ee80-7a9e-4350-b264-8e670f12517c"

[targets]
test = ["Test", "Plots"]
test = ["Test", "ControlPlots"]
14 changes: 8 additions & 6 deletions test/plot_step_response.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ENV["GKSwstype"]="nul"
using KitePodModels, Plots
using KitePodModels, ControlPlots

cd("..")

@@ -30,11 +30,13 @@ for step in 1:Int(round(t_end/dt))
push!(depower, get_depower(kcu))
push!(steering, get_steering(kcu))
end
l = @layout([a; b])
plot(times, depower, layout=l, subplot=1, label = "depower", legend = :bottomright)
plot!(times, depower_set, layout=l, subplot=1, label = "depower_set")
plot!(times, steering, layout=l, subplot=2, label = "steering", legend = :bottomright)
plot!(times, steering_set, layout=l, subplot=2, label = "steering_set")
# l = @layout([a; b])
# plot(times, depower, layout=l, subplot=1, label = "depower", legend = :bottomright)
# plot!(times, depower_set, layout=l, subplot=1, label = "depower_set")
# plot!(times, steering, layout=l, subplot=2, label = "steering", legend = :bottomright)
# plot!(times, steering_set, layout=l, subplot=2, label = "steering_set")
plotx(times, [depower, depower_set], [steering, steering_set]; ylabels=["depower","steering"],
labels=[["depower","depower_set"], ["steering", "steering_set"]], fig="step_response")
# This could become an example script, but a test should not write to this directory
# savefig("docs/src/step_response.png")
# println("Saved step response in docs/src/step_response.png !")

0 comments on commit 5e1e50c

Please sign in to comment.