From a7ee5b0e8b1f617611db3bc9a434ecef248a5516 Mon Sep 17 00:00:00 2001 From: Dane Sabo Date: Mon, 9 Sep 2024 13:43:23 -0400 Subject: [PATCH] vault backup: 2024-09-09 13:43:23 --- .../2024-09-09 Example.py | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09 Example.py b/300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09 Example.py index 23214c57..eb7dc99d 100644 --- a/300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09 Example.py +++ b/300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09 Example.py @@ -1,6 +1,26 @@ from scipy.integrate import odeint -import motplotlib.pyplot as plt +import matplotlib.pyplot as plt import numpy as np import pylab as pl import math +#plot f(x) vs. x +x = np.arange(-4.0,4.0,0.01) +fx = 4*x**2 - 16 +zerox = 0.*x + +#Create plot env +f = plt.figure() +plt.grid(True) +f.set_figwidth(8) +f.set_figheight(8) + +#plot some stuff +plt.plot(x,fx,'g-',x,zerox,'b-') + +plt.xlabel('x',fontsize = 15) +plt.ylabel('y', fontsize = 15) +plt.savefig("2024-09=09/ex1.png") + + +