From 84b797f157bc0919ae80c2fd52fb134d764247fc Mon Sep 17 00:00:00 2001 From: Joshua Marshall Date: Sun, 30 Jan 2022 21:29:55 -0500 Subject: [PATCH] Updated README.md --- oneD_kinematic.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/oneD_kinematic.py b/oneD_kinematic.py index 6f2cf9c..a3bf65d 100644 --- a/oneD_kinematic.py +++ b/oneD_kinematic.py @@ -48,6 +48,10 @@ def vehicle(x, u, T): plt.rc("savefig", format="pdf") plt.rc("savefig", bbox="tight") +# Change these to the locations where you wish to store outputs +pdf_path = "../agv-book/figs/ch2/" +gif_path = "../agv-book/gifs/ch2/" + # Plot the state (x) and input (u) vs time (t) fig1 = plt.figure(1) ax1a = plt.subplot(211) @@ -62,7 +66,7 @@ def vehicle(x, u, T): plt.xlabel(r"$t$ [s]") # Save the plot -plt.savefig("../agv-book/figs/ch2/oneD_kinematic_fig1.pdf") +plt.savefig(pdf_path + "oneD_kinematic_fig1.pdf") # %% MAKE AN ANIMATION @@ -74,7 +78,7 @@ def vehicle(x, u, T): # Create and save the animation ani = vehicle.animate(x, T, LENGTH, True, - "../agv-book/gifs/ch2/oneD_kinematic.gif") + gif_path + "oneD_kinematic.gif") # %% DISPLAY PLOTS