<!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--> <!--You can feel free to delete the sections that do not apply.--> ### Bug report **Bug summary** Setting ``` font.family: serif ``` Does not effect math text like `ax.set_xlabel('$E / \mathrm{GeV}$')`. <!--A short 1-2 sentences that succinctly describes the bug--> **Code for reproduction** <!--A minimum code snippet required to reproduce the bug, also minimizing the number of dependencies required--> ```python import matplotlib.pyplot as plt plt.rcParams['font.family'] = 'serif' plt.plot([1, 2, 3]) plt.xlabel('$E / \mathrm{GeV}$') plt.ylabel('E / GeV') ``` **Actual outcome** sans-serif font for the axis label using math  **Expected outcome** Both axes labels using serif font **Matplotlib version** <!--Please specify your platform and versions of the relevant libraries you are using:--> * Operating System: Ubuntu 16.10 * Matplotlib Version: 2.0.2 * Python Version: 3.6