Skip to content

Commit 84b797f

Browse files
committed
Updated README.md
1 parent d2f12fc commit 84b797f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

oneD_kinematic.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ def vehicle(x, u, T):
4848
plt.rc("savefig", format="pdf")
4949
plt.rc("savefig", bbox="tight")
5050

51+
# Change these to the locations where you wish to store outputs
52+
pdf_path = "../agv-book/figs/ch2/"
53+
gif_path = "../agv-book/gifs/ch2/"
54+
5155
# Plot the state (x) and input (u) vs time (t)
5256
fig1 = plt.figure(1)
5357
ax1a = plt.subplot(211)
@@ -62,7 +66,7 @@ def vehicle(x, u, T):
6266
plt.xlabel(r"$t$ [s]")
6367

6468
# Save the plot
65-
plt.savefig("../agv-book/figs/ch2/oneD_kinematic_fig1.pdf")
69+
plt.savefig(pdf_path + "oneD_kinematic_fig1.pdf")
6670

6771
# %% MAKE AN ANIMATION
6872

@@ -74,7 +78,7 @@ def vehicle(x, u, T):
7478

7579
# Create and save the animation
7680
ani = vehicle.animate(x, T, LENGTH, True,
77-
"../agv-book/gifs/ch2/oneD_kinematic.gif")
81+
gif_path + "oneD_kinematic.gif")
7882

7983
# %% DISPLAY PLOTS
8084

0 commit comments

Comments
 (0)