1"""
2=======================
3Annotate Simple Coord02
4=======================
5
6"""
7
8import matplotlib.pyplot as plt
9
10
11fig, ax = plt.subplots(figsize=(3, 2))
12an1 = ax.annotate("Test 1", xy=(0.5, 0.5), xycoords="data",
13                  va="center", ha="center",
14                  bbox=dict(boxstyle="round", fc="w"))
15
16an2 = ax.annotate("Test 2", xy=(0.5, 1.), xycoords=an1,
17                  xytext=(0.5, 1.1), textcoords=(an1, "axes fraction"),
18                  va="bottom", ha="center",
19                  bbox=dict(boxstyle="round", fc="w"),
20                  arrowprops=dict(arrowstyle="->"))
21
22fig.subplots_adjust(top=0.83)
23plt.show()
24