Plotting with matplotlib
General
- Import
matplotlib.pyplot
using the standard convention in the Python community.
Line Plots
- State the procedure to generate a line plot approximation to a function’s graph on a given interval using
numpy
and matplotlib
.
- Generate a line plot approximation to a provided function using
numpy
and matplotlib
.
Interactive Plots
- Use the magic command
%matplotlib
to toggle static in-line, interactive in-line, and pop-out figures in Jupyter notebooks.
Modifying and Decorating Plots
- Modify the horizontal and vertical limits on a
matplotlib
figure using the plt.*lim()
functions.
- Add horizontal and vertical labels to a
matplotlib
figure using the plt.*label()
functions.
- Add a legend to a
matplotlib
figure using the plt.legend()
function.
Saving Plots
- Save a
matplotlib
figure using plt.savefig()
.
Programmatically Constructing Plots
- Generate a specified
matplotlib
figure programmatically using programming concepts from earlier in the course (e.g. conditional statements, loops, formatted strings, etc.).
- Use
np.zeros()
and np.ones()
to generate accumulator arrays for sums and products, respectively.
- Programmatically generate figures with the graphs of Taylor polynomials for a given function.
Scatter Plots
- Generate scatter plots using
matplotlib
.