Answers for "matplotlib alpha only on graph not legend"

0

matplotlib don't use the alpha value of the plot in legend

import matplotlib.pyplot as plt
#Generate legend
leg = plt.legend()
#Disable opacity for legend
for lh in leg.legendHandles: 
    lh.set_alpha(1)
Posted by: Guest on July-16-2021

Python Answers by Framework

Browse Popular Code Answers by Language