Matplotlib is incorrectly rendering axis labels in sans-serif when using LaTeX
I was importing the seaborn package after setting the matplotlib rcParams, which overwrote values such as the font family. Calling rcParams.update(params) after importing seaborn fixes the problem.
I am using matplotlib.rc('text', usetex=True); matplotlib.rc('font', family='serif') to set my font to serif with LaTeX. This works for the tick labels, however the plot title and axis lables are typeset using the sans-serif CMS S 12 computer modern variant.
From what I have found on the web, most people seem to have trouble using the sans-serif font. For me the opposite is the case, I cannot get the serif font to work properly.
I have tried a hacky solution of setting the sans-serif font to Computer Modern, which unfortunately does not work either.