Learn to add tick marks, grid lines, and labels to a 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
- [Instructor] The tick marks, labels, and grids file…in your exercise folders is pre-populated with import…statements for NumPy and Pyplot…and the code snippet that we're going to use…for our demonstration in this video.…Before you begin, go to the cell that contains the import…statements and press shift enter.…In this video I'll describe techniques to make your plots…more useful, that is to make the data in your plots…easier to read and interpret.…
We'll begin by parameterizing the number of data points.…Next we'll instantiate a figure object…using plot dot figure.…Our first subplot will be added with the parameters…one, one and one.…This indicates that we intend to include…only one subplot within our figure.…Within the subplot we'll use NumPy's random generating…capability to generate a number of data points…then chain the cumulative summation method…to create a cumulative sum of all our data.…
Let's add tick marks to our plot.…We'll add five, we'll use NumPy's A range function…to create the ticks…and then we'll use the set X ticks to add the ticks…
- 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?
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.