Charles Kelly explains how to add tick marks, labels, and grids to plots using matplotlib within Jupyter notebooks.
- [Instructor] The Tick Marks file…from your Exercises file folder…is pre-populated with import statements…for pandas, numpy, pyplot,…and a style directive for ggplot.…It also contains a sample data set.…Begin by placing your cursor in this cell…and execute the cell by pressing shift enter.…We can parameterize the number of data points…within our data set,…in this case we'll set it equal to 10.…Next we'll use plot's figure function…to create a single figure.…
We'll create a single figure within a subplot…with a one by one grid.…We'll generate a random data set…by chaining numpy's random function…with numpy's cumulative summation function.…If we plot this data set with 10 data points,…we can look at the plot,…and we can see that the x-axis ranges from zero to nine,…and the y-axis ranges from zero to three.…We can enhance the plot by adding tick marks labels.…
Here we'll copy this code from your final data set…and paste it into your begin data set.…Once again, execute the cell,…and now we can see we have tick marks,…
Watch this course to gain an overview of pandas. Charles Kelly helps you get started with time series, data frames, panels, plotting, and visualization. All you need is a copy of the free and interactive Jupyter Notebook app to practice and follow along.
- Using the Markdown language and Jupyter Notebook
- Creating objects
- Selecting objects
- Using operations
- Merging data
- Creating series
- Creating data frames
- Creating panels
- Annotating plots and data frame plots
Skill Level Intermediate
NumPy Data Science Essential Trainingwith Charles Kelly3h 54m Intermediate
SQL: Data Reporting and Analysiswith Emma Saunders2h 16m Intermediate
1. Introduction to Notebooks
2. Pandas Overview
4. Data Frames and Panels
- 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.