Here is the explanation of the code:
- The plt.annotate() method annotates the graph with specified details.
- (3, 0) specifies the text to be displayed as description.
- xy = (3, 0) specifies the co-ordinates of the point to be annotated on the graph.
- xycoords='data' specifies that the xy co-ordinates specified are with respect to the data (points in input data).
- arrowprops() specifies the style, linewidth, color, connectionstyle of the arrow to be used from the text to the point being annotated.
- plt.setp() sets the font size of the text (3, 0) to 25.
We get the following output by running the preceding code: