fig, ax = plt.subplots() ax.plot([1, 2, 3], label='data') ax.legend(linewidth=2.0) # Thick legend box edge