Annotation is used to describe specific details on the plot, by pointing to the area being described in text. We will cover a simple example in the recipe. A more elaborate description is covered in later chapters.
Using annotation
Getting ready
Import the required libraries:
import matplotlib.pyplot as plt
import numpy as np
How to do it...
The following code block displays a plot on which a point (3, 0) is annotated with an arrow:
plt.plot(theta, np.sin(theta), 'b-*')
a = plt.annotate("(3,0)", xy=(3, 0), xycoords='data', xytext=(4.0,
...