Skip to content

Commit

Permalink
Updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
botprof committed Jan 31, 2022
1 parent d2f12fc commit 84b797f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions oneD_kinematic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 84b797f

Please sign in to comment.