Modifying the Patch in the legend leaving alone the Patch in the scatter plot
Modifying the Patch in the legend leaving alone the Patch in the scatter plot Question: I can change the opacity of an item in the legend of a scatter plot import matplotlib.pyplot as plt # note the alpha value vvvvvvvvvv plt.scatter(range(10), range(10), alpha=0.15, label=’Mount Resegone’) plt.scatter(range(10), [0]*10, alpha=0.15, label=’Rimini Beach’) plt.gca().get_legend_handles_labels()[0][0].set_alpha(1.0) plt.legend() plt.show() but doing …