x = np.linspace(0, 10, 100)
y = 2 * x
thickness = 0.5 * np.abs(np.sin(x) * np.cos(x))
plt.fill_between(x, y - thickness, y + thickness, color='blue')
plt.show()
How do you make the linewidth of a single line change as a function of x in matplotlib?