I am trying to change the font weight in matplotlib with the following code:
from matplotlib import pyplot as plt
import numpy as np
plt.rcParams.update({"font.size":16})
plt.rcParams["axes.labelweight"] = "light"
plt.rcParams["font.weight"] = "light"
t = np.arange(0.0, 2.0, 0.01)
s = 1 + np.sin(2 * np.pi * t)
plt.figure(4)
plt.plot(t,s)
plt.ylabel("y label")
plt.xlabel("x label")
plt.savefig("test.pdf",bbox_inches="tight",format="pdf",transparent=True)
However, only the bold and normal weights seem to work. Despite of the fact "light" or "ultralight" are listed as possible options in the doc, I don't see any difference between them and the "normal" font weight.