matplotlib line opacity code example Example: matplotlib transparent line plt.plot(x, y, 'r-', alpha=0.7)