When drawing graphs with dense information, a legend may be required to determine the specific colors or help better understand the data presented. In matplotlib, legends can be pretty rich and have multiple ways of presenting them. Annotations to draw attention to specific points are also good ways to focus the message for the audience.
In this recipe, we'll create a graph with three different components and display a legend with information to better understand it, as well as annotating the most interesting points on our graph.