From 1e9774b0ef35fe0645af69c5092a886fc510b610 Mon Sep 17 00:00:00 2001 From: schillic Date: Thu, 11 Apr 2024 20:31:18 +0200 Subject: [PATCH] fix commented savefig command in models --- models/ACC/ACC.jl | 2 +- models/Airplane/Airplane.jl | 2 +- models/AttitudeControl/AttitudeControl.jl | 2 +- models/InvertedPendulum/InvertedPendulum.jl | 2 +- models/InvertedTwoLinkPendulum/InvertedTwoLinkPendulum.jl | 8 ++++---- models/Quadrotor/Quadrotor.jl | 2 +- models/SpacecraftDocking/SpacecraftDocking.jl | 4 ++-- models/TORA/TORA.jl | 8 ++++---- models/Unicycle/Unicycle.jl | 4 ++-- models/VerticalCAS/VerticalCAS.jl | 4 ++-- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/models/ACC/ACC.jl b/models/ACC/ACC.jl index 24f605bf..2883573e 100644 --- a/models/ACC/ACC.jl +++ b/models/ACC/ACC.jl @@ -247,8 +247,8 @@ end; # Plot the results: fig = plot_helper(sol_relu, sim_relu) +## Plots.savefig(fig, "ACC-ReLU.png") # command to save the plot to a file fig = DisplayAs.Text(DisplayAs.PNG(fig)) -## savefig(fig, "ACC-ReLU.png") # command to save the plot to a file #- diff --git a/models/Airplane/Airplane.jl b/models/Airplane/Airplane.jl index 1f7bbb20..a88dd2dd 100644 --- a/models/Airplane/Airplane.jl +++ b/models/Airplane/Airplane.jl @@ -280,8 +280,8 @@ else xlims!(-0.55, 0.55) ylims!(-1.05, 1.05) end +## Plots.savefig(fig, "Airplane.png") # command to save the plot to a file fig = DisplayAs.Text(DisplayAs.PNG(fig)) -## savefig(fig, "Airplane.png") # command to save the plot to a file end #jl nothing #jl diff --git a/models/AttitudeControl/AttitudeControl.jl b/models/AttitudeControl/AttitudeControl.jl index 3a028994..6ceb44f5 100755 --- a/models/AttitudeControl/AttitudeControl.jl +++ b/models/AttitudeControl/AttitudeControl.jl @@ -160,8 +160,8 @@ end; vars = (1, 2) fig = plot_helper(vars) plot!(fig; xlab="ω₁", ylab="ω₂") +## Plots.savefig(fig, "AttitudeControl.png") # command to save the plot to a file fig = DisplayAs.Text(DisplayAs.PNG(fig)) -## savefig(fig, "AttitudeControl.png") # command to save the plot to a file end #jl nothing #jl diff --git a/models/InvertedPendulum/InvertedPendulum.jl b/models/InvertedPendulum/InvertedPendulum.jl index 27aaf631..7ccdc89d 100644 --- a/models/InvertedPendulum/InvertedPendulum.jl +++ b/models/InvertedPendulum/InvertedPendulum.jl @@ -196,8 +196,8 @@ end; # Plot the results: fig = plot_helper() +## Plots.savefig(fig, "InvertedPendulum.png") # command to save the plot to a file fig = DisplayAs.Text(DisplayAs.PNG(fig)) -## savefig(fig, "InvertedPendulum.png") # command to save the plot to a file end #jl nothing #jl diff --git a/models/InvertedTwoLinkPendulum/InvertedTwoLinkPendulum.jl b/models/InvertedTwoLinkPendulum/InvertedTwoLinkPendulum.jl index 5a55a969..ef91b7d3 100644 --- a/models/InvertedTwoLinkPendulum/InvertedTwoLinkPendulum.jl +++ b/models/InvertedTwoLinkPendulum/InvertedTwoLinkPendulum.jl @@ -263,18 +263,18 @@ end; vars=(3, 4) fig = plot_helper(vars, sol_lr, sim_lr, prob_lr, spec_lr) plot!(fig; xlab="θ₁'", ylab="θ₂'") -fig = DisplayAs.Text(DisplayAs.PNG(fig)) ## Command to save the plot to a file: -## savefig(fig, "InvertedTwoLinkPendulum-less-robust.png") +## Plots.savefig(fig, "InvertedTwoLinkPendulum-less-robust.png") +fig = DisplayAs.Text(DisplayAs.PNG(fig)) #- vars=(3, 4) fig = plot_helper(vars, sol_mr, sim_mr, prob_mr, spec_mr) plot!(fig; xlab="θ₁'", ylab="θ₂'") -fig = DisplayAs.Text(DisplayAs.PNG(fig)) ## Command to save the plot to a file: -## savefig(fig, "InvertedTwoLinkPendulum-more-robust.png") +## Plots.savefig(fig, "InvertedTwoLinkPendulum-more-robust.png") +fig = DisplayAs.Text(DisplayAs.PNG(fig)) end #jl nothing #jl diff --git a/models/Quadrotor/Quadrotor.jl b/models/Quadrotor/Quadrotor.jl index a8afc0ca..03d2b0cb 100755 --- a/models/Quadrotor/Quadrotor.jl +++ b/models/Quadrotor/Quadrotor.jl @@ -187,8 +187,8 @@ end; vars = (0, 3) fig = plot_helper(vars) plot!(fig; xlab="t", ylab="x₃") +## Plots.savefig(fig, "Quadrotor.png") # command to save the plot to a file fig = DisplayAs.Text(DisplayAs.PNG(fig)) -## savefig(fig, "Quadrotor.png") # command to save the plot to a file end #jl nothing #jl diff --git a/models/SpacecraftDocking/SpacecraftDocking.jl b/models/SpacecraftDocking/SpacecraftDocking.jl index 090e69e0..f7cb0e21 100644 --- a/models/SpacecraftDocking/SpacecraftDocking.jl +++ b/models/SpacecraftDocking/SpacecraftDocking.jl @@ -155,16 +155,16 @@ end; vars = (1, 2) fig = plot_helper(vars) plot!(fig; xlab="x", ylab="y") +## Plots.savefig(fig, "SpacecraftDocking-x-y.png") # command to save the plot to a file fig = DisplayAs.Text(DisplayAs.PNG(fig)) -## savefig(fig, "SpacecraftDocking-x-y.png") # command to save the plot to a file #- vars = (3, 4) fig = plot_helper(vars) plot!(fig; xlab="x'", ylab="y'") +## Plots.savefig(fig, "SpacecraftDocking-x'-y'.png") # command to save the plot to a file fig = DisplayAs.Text(DisplayAs.PNG(fig)) -## savefig(fig, "SpacecraftDocking-x'-y'.png") # command to save the plot to a file end #jl nothing #jl diff --git a/models/TORA/TORA.jl b/models/TORA/TORA.jl index f6a6444e..9e93d35f 100644 --- a/models/TORA/TORA.jl +++ b/models/TORA/TORA.jl @@ -270,16 +270,16 @@ end; vars = (1, 2) fig = plot_helper1(vars) plot!(fig; xlab="x₁", ylab="x₂") +## Plots.savefig(fig, "TORA-ReLU-x1-x2.png") # command to save the plot to a file fig = DisplayAs.Text(DisplayAs.PNG(fig)) -## savefig(fig, "TORA-ReLU-x1-x2.png") # command to save the plot to a file #- vars = (3, 4) fig = plot_helper1(vars) plot!(fig; xlab="x₃", ylab="x₄") +## Plots.savefig(fig, "TORA-ReLU-x3-x4.png") # command to save the plot to a file fig = DisplayAs.Text(DisplayAs.PNG(fig)) -## savefig(fig, "TORA-ReLU-x3-x4.png") # command to save the plot to a file #- @@ -305,8 +305,8 @@ lens!(fig, [-0.785, -0.735], [-0.47, -0.41]; inset=(1, bbox(0.2, 0.4, 0.2, 0.2)) lc=:black, xticks=[-0.77, -0.75], yticks=[-0.45, -0.43], subplot=3) lens!(fig, [0.0, 0.25], [-0.85, -0.7]; inset=(1, bbox(0.6, 0.4, 0.2, 0.2)), lc=:black, xticks=[0, 0.2], yticks=[-0.8, -0.7], subplot=3) +## Plots.savefig(fig, "TORA-ReLUtanh.png") # command to save the plot to a file fig = DisplayAs.Text(DisplayAs.PNG(fig)) -## savefig(fig, "TORA-ReLUtanh.png") # command to save the plot to a file #- @@ -315,8 +315,8 @@ lens!(fig, [-0.785, -0.735], [-0.47, -0.41]; inset=(1, bbox(0.2, 0.4, 0.2, 0.2)) lc=:black, xticks=[-0.77, -0.75], yticks=[-0.45, -0.43], subplot=3) lens!(fig, [0.09, 0.22], [-0.9, -0.8]; inset=(1, bbox(0.6, 0.4, 0.2, 0.2)), lc=:black, xticks=[0.1, 0.2], yticks=[-0.9, -0.8], subplot=3) +## Plots.savefig(fig, "TORA-sigmoid.png") # command to save the plot to a file fig = DisplayAs.Text(DisplayAs.PNG(fig)) -## savefig(fig, "TORA-sigmoid.png") # command to save the plot to a file end #jl nothing #jl diff --git a/models/Unicycle/Unicycle.jl b/models/Unicycle/Unicycle.jl index 68e5fdc4..57dfb443 100644 --- a/models/Unicycle/Unicycle.jl +++ b/models/Unicycle/Unicycle.jl @@ -180,8 +180,8 @@ lens!(fig, [9.49, 9.56], [-4.51, -4.44]; inset=(1, bbox(0.65, 0.05, 0.25, 0.25)) lc=:black, xticks=[9.5, 9.55], yticks=[-4.5, -4.45], subplot=2) lens!(fig, [0.3, 0.7], [-0.25, 0.25]; inset=(1, bbox(0.1, 0.3, 0.25, 0.25)), lc=:black, xticks=[0.4, 0.6], yticks=[-0.2, 0.2], subplot=3) +## Plots.savefig(fig, "Unicycle-x1-x2.png") # command to save the plot to a file fig = DisplayAs.Text(DisplayAs.PNG(fig)) -## savefig(fig, "Unicycle-x1-x2.png") # command to save the plot to a file #- @@ -192,8 +192,8 @@ lens!(fig, [2.09, 2.12], [1.495, 1.515]; inset=(1, bbox(0.72, 0.54, 0.25, 0.25)) lc=:black, xticks=[2.1, 2.11], yticks=[1.5, 1.51], subplot=2) lens!(fig, [-0.1, 0.03], [-0.4, -0.15]; inset=(1, bbox(0.1, 0.1, 0.25, 0.25)), lc=:black, xticks=[-0.08, 0], yticks=[-0.3, -0.2], subplot=3) +## Plots.savefig(fig, "Unicycle-x3-x4.png") # command to save the plot to a file fig = DisplayAs.Text(DisplayAs.PNG(fig)) -## savefig(fig, "Unicycle-x3-x4.png") # command to save the plot to a file end #jl nothing #jl diff --git a/models/VerticalCAS/VerticalCAS.jl b/models/VerticalCAS/VerticalCAS.jl index 7917bfe0..5e52ee59 100644 --- a/models/VerticalCAS/VerticalCAS.jl +++ b/models/VerticalCAS/VerticalCAS.jl @@ -387,8 +387,8 @@ fig = plot_helper() for o in sol_random plot!(fig, o; alpha=1, markershape=:none) end +## Plots.savefig("VerticalCAS-rand.png") # command to save the plot to a file fig = DisplayAs.Text(DisplayAs.PNG(fig)) -## savefig("VerticalCAS-rand.png") # command to save the plot to a file #- @@ -400,8 +400,8 @@ for (i, c) in [(1, :brown), (2, :green), (3, :orange), (4, :cyan)] lab = "" end end +## Plots.savefig("VerticalCAS-sets.png") # command to save the plot to a file fig = DisplayAs.Text(DisplayAs.PNG(fig)) -## savefig("VerticalCAS-sets.png") # command to save the plot to a file end #jl nothing #jl