Learn to add multiple lines to one plot within Jupyter notebooks using matplotlib and NumPy in this video tutorial by Charles Kelly. These are explained in the context of computer science and data science to technologists and students in preparation for m
- [Narrator] The multiple lines single plot file…in your exercise folder is pre-populated…with import statements for NumPy and PyPlot,…as well as a randomly generated data set…for high and low temperatures.…Before using this notebook,…go to the cell menu and select run all.…In this video, we'll learn how to display multiple lines…within a single plot.…Let's examine the randomized data sets…for high and low temperatures.…
We parameterize the data sets…so that we can select the number of data points.…We'll begin with 15 data points.…In statistics,…the convention is to use the Greek letter mu for mean…and the the Greek letter sigma for standard deviations.…We'll use Python's multiple assignment facilities,…and assign 50 to the mean and 4.3 to the standard deviation.…We'll generate the low data set…starting with low mu plus low sigma,…times NumPy's random data set generation facility…with our data set size.…
In this case, it's 15 data points.…We'll do the same thing for the high data set.…Then we'll create a list…which includes a range from one to the size of the data set.…
- Using Jupyter Notebook
- Creating NumPy arrays from Python structures
- Slicing arrays
- Using Boolean masking and broadcasting techniques
- Plotting in Jupyter notebooks
- Joining and splitting arrays
- Rearranging array elements
- Creating universal functions
- Finding patterns
- Building magic squares and magic cubes with NumPy and Python
Skill Level Intermediate
2. Create NumPy Arrays
3. Index, Slice, and Iterate
4. Plots: Matplotlib and Pyplot
5. Manipulate Arrays
6. Short Examples
7. Extended Examples
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.