How to make the arrow thinner matplotlib

I am drawing an arrow as shown below, while I think it is a little big. How can I make it thinner and smaller? Thanks you

for i in range(len(x)): plt.annotate(df.index[i],xy=(x[i],y[i]),xytext=(x[i]+1.31,y[i]-0.55),arrowprops=dict(facecolor='blue', shrink=0.1)) 
+8
source share
1 answer

You should try setting the width parameter (from the docs )

 plt.annotate(df.index[i], xy=(x[i],y[i]), xytext=(x[i]+1.31,y[i]-0.55), arrowprops=dict(facecolor='blue', shrink=0.1, width=2) ) 

I adjusted your snippet to make the parameter more obvious. Also note that width is in points, so you may need several different values. Other values ​​worth paying attention to are frac . headwidth and shrink ( also in the docs ), especially if you want to make your head smaller!

+6
source

All Articles