How to: Plot a Function in Python
Learn how to define a function and plot it in Python. Script can be found here: https://www.hageslab.com/Resources.ht... Here we are using "Spyder" IDE with the numpy and matplotlib libraries Useful resources: https://matplotlib.org/tutorials/text... https://matplotlib.org/ https://matplotlib.org/3.3.3/api/_as_... Script: import numpy as np import matplotlib.pyplot as plt def f(x,a,b,c): return a*x**2+b*x+c xlist = np.linspace(-10,10,num=1000) xlist = np.arange(-10,10.1,.1) a=5 b=1 c=4 ylist = f(xlist,a,b,c) plt.figure(num=0,dpi=120) plt.plot(xlist,ylist,label="f(x)") plt.plot(xlist,ylist**(1/2),'--g',label=r"f(x)$^{0.5}$") plt.title("Plotting Example") plt.xlabel("Distance / ft") plt.ylabel("Height / ft") plt.legend()

▶︎
NumPy Tutorial: For Physicists, Engineers, and Mathematicians

▶︎
Matplotlib Tutorial: For Physicists, Engineers, and Mathematicians

▶︎
What does '__init__.py' do in Python?

▶︎
How to: Solve an ODE in Python (Boundary Value Problem)

▶︎
Python Tutorial for Beginners #13 - Plotting Graphs in Python (matplotlib)

▶︎
How to: Import, Plot, Fit, and Integrate Data in Python

▶︎
10 Important Python Concepts In 20 Minutes

▶︎
Nothing about the honey badger is normal... and here is why

▶︎
Python Video 07d: Plotting Contour and Surface Plots with Matplotlib

▶︎
How To Think SO CLEARLY People Assume You're A Genius

▶︎
Curve Fitting in Python (2022)
![Animating Plots In Python Using MatplotLib [Python Tutorial]](https://i.ytimg.com/vi/bNbN9yoEOdU/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLCmpG5AJ3FXa7jSTkeRl81s4Rvq-Q)
▶︎
Animating Plots In Python Using MatplotLib [Python Tutorial]

▶︎
The SpaceX Bubble Crash Is Worse Than It Looks

▶︎
The Complete Guide to Python Virtual Environments!

▶︎
If You Have A Bad Memory, I’ll Help You Fix It In 28 Minutes

▶︎
Derivatives In PYTHON (Symbolic AND Numeric)

▶︎
SciPy Tutorial: For Physicists, Engineers, and Mathematicians

▶︎
Python Generators Explained

▶︎
Matplotlib Tutorial (Part 10): Subplots

▶︎
