在 matplotlib 中指定图例框架的线宽 [英] Specifying the line width of the legend frame, in matplotlib
本文介绍了在 matplotlib 中指定图例框架的线宽的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在matplotlib中,如何指定图例框架的线宽和颜色?
In matplotlib, how do I specify the line width and color of a legend frame?
推荐答案
对于宽度:legend.get_frame().set_linewidth(w)
对于颜色:legend.get_frame().set_edgecolor("red")
这篇关于在 matplotlib 中指定图例框架的线宽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文