您可以使用linewidth
参数。 以下是一个例子
import matplotlib.pyplot as plt
xy = [0.2,0.2]
xytext =[0.5,0.5]
plt.figure()
ax = plt.gca()
ax.annotate("Text", xy=xy, xytext=xytext, arrowprops=dict(arrowstyle="<|-,
head_width=2, head_length=2", edgecolor = 'k', facecolor = 'r',
linewidth=4))