📜  matplotlib 不要使用图例中的 alpha 值 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:16.206000             🧑  作者: Mango

代码示例1
import matplotlib.pyplot as plt
#Generate legend
leg = plt.legend()
#Disable opacity for legend
for lh in leg.legendHandles: 
    lh.set_alpha(1)