From the course: More Python Tips, Tricks, and Techniques for Data Science

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Adding text and annotations

Adding text and annotations - Python Tutorial

From the course: More Python Tips, Tricks, and Techniques for Data Science

Start my 1-month free trial

Adding text and annotations

- [Instructor] Good visualizations guide the readers to get the complete story that the data has to tell. Now, to create guided plots using matplotlib we can add labels to the plot. The basic types of annotations you will use are access labels and titles, but we have more options to make the plots more informative. So in this video, I'll walk you through methods of adding text highlights, annotating plots, and adding arrows to point to a specific location in a plot. So, first off we are importing the required libraries matplotlib, pandas, NumPy. And for this video, we are going to be using the advertising.csv file that we have, which contains the revenue for all the media sources, TV, radio, newspaper. Let's look at the average revenue that we have from each one of them. So, all of these values are in a hundred thousand. TV has been 49.79 radio has 23.09, and then newspaper has turned 29.64. So let's go ahead and plot…

Contents