**
plt.legend()的几种用法
**
(1)设置图列位置
```python
plt.legend(loc=' ')
![](https://img-blog.csdnimg.cn/20200830165252486.png#pic_center)
**(2)设置图例字体大小**
```python
fontsize : int or float or {‘xx-small’, ‘x-small’, ‘small’, ‘medium’, ‘large’, ‘x-large’, ‘xx-large’}
(3)设置图例边框及背景
plt.legend(loc='best',frameon=False) #去掉图例边框
plt.legend(loc='best',edgecolor=