<!--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** <!--A short 1-2 sentences that succinctly describes the bug--> "Bad" deprecation warning: LaTeX $\pm$ raises a DeprecationWarning: Invalid escape sequence \p. **Code for reproduction** <!--A minimum code snippet required to reproduce the bug, also minimizing the number of dependencies required--> ```python import warnings import matplotlib.pyplot as plt warnings.simplefiler('always') plt.text('Silly Error $\pm$ silliness') ``` **Actual outcome** <!--The output produced by the above code, which may be a screenshot, console output, etc.--> ``` # If applicable, paste the console output here >>> plt.title('Silly error $\pm$ silliness') <stdin>:1: DeprecationWarning: invalid escape sequence \p Text(0.5,1,'Silly error $\\pm$ silliness') ``` **Expected outcome** <!--A description of the expected outcome from the code snippet--> No error -- This is LaTeX, surrounded by $ $, not an escape sequence. (Note that the plot itself looks fine, with a plus-minus sign.) <!--If this used to work in an earlier version of Matplotlib, please note the version it used to work on--> **Matplotlib version** <!--Please specify your platform and versions of the relevant libraries you are using:--> * Operating system: MacOs X * Matplotlib version: 2.2.2 * Matplotlib backend: notebook, Qt, MacOSX, Tk * Python version: 3.6.2 * Jupyter version (if applicable): 4.3.0 * Other libraries: warnings <!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--> conda <!--If you installed from conda, please specify which channel you used if not the default--> default, conda-forge