import matplotlib.pyplot as plt
import matplotlib
fig, ax = plt.subplots()
ax.annotate('Matplotlib {}'.format(matplotlib.__version__),
xy=(0.1, 0.1), xytext=(50, 50), size=20,
xycoords='data', textcoords='offset points',
bbox=dict(alpha=0.5, fc='yellow'),
arrowprops=dict(arrowstyle='->'))
plt.show()
Prior to matplotlib 1.4.3, text bounding boxes created with
annotatedid not include the connection arrow. Starting with 1.4.3 and continuing up to the current HEAD, the bbox includes the connection arrow.As an example:
This may be related to #4012?