import matplotlib.pyplot as plt
plt.legend(loc='lower right', fontsize=12, frameon=True, fancybox=True, framealpha=0.2, borderpad=0.3,ncol=1, markerfirst=True, markerscale=1, numpoints=1, handlelength=3.5)#loc:圖例位置,可取(‘best’, ‘upper right’, ‘upper left’, ‘lower left’, ‘lower right’, ‘right’, ‘center left’, ‘center , right’, ‘lower center’, ‘upper center’, ‘center’) ;若是使用了bbox_to_anchor,則這項就無效了
#fontsize:代表字體大小,int或float或{‘xx-small’, ‘x-small’, ‘small’, ‘medium’, ‘large’, ‘x-large’, ‘xx-large’}
#frameon:是否顯示圖例邊框,
#ncol:圖例的列的數量,默認為1,
#title:為圖例添加標題
#shadow:是否為圖例邊框添加陰影,
#markerfirst:True表示圖例標簽在句柄右側,false反之,
#markerscale:圖例標記為原圖標記中的多少倍大小,
#numpoints:表示圖例中的句柄上的標記點的個數,一般設為1,
#fancybox:是否將圖例框的邊角設為圓形
#framealpha:控制圖例框的透明度
#borderpad:圖例框內邊距
#labelspacing:圖例中條目之間的距離
#andlelength:圖例句柄的長度
#bbox_to_anchor:(橫向看右,縱向看下),如果要自定義圖例位置或者將圖例畫在坐標外邊,用它
python—matplotlib庫系列學習