Lab 18 — Plotting with matplotlib
In this lab you will practice plotting using matplotlib. Start by downloading lab18-plotting-with-matplotlib.ipynb. Write all your code in this Jupyter notebook.
Setup
To get things setup for this lab, do the following in a terminal:
conda activate cs110
conda install jupyter
Reminder: The easiest way for you to do this is to use the PyCharm terminal.
Then you can run jupyter from a terminal:
jupyter notebook
See the Introduction to Jupyter if you need help with using Jupyter.
Problems
Complete all the sections of the notebook you downloaded above.
Lessons
What we want you to get from this lab:
-
You are able to use a Jupyter notebook
-
You can do some basic plotting with matplotlib
-
Hopefully you had fun!
Points
Turn in your Python notebook.
Task | Description | Points |
---|---|---|
linspace | One practice problem | 1 |
Arrays | Three practice problems | 1 |
Plot a line | Your solution works | 1 |
Plot a function | Your solution works | 1 |
Plot sin() | Your solution works | 1 |
Plot sin() and cos() | Your solution works | 1 |
Plot a complex function | Your solution works | 2 |
Three plots of your own | Your solution works | 2 |