(caplog)
| 201 | |
| 202 | @needs_usetex |
| 203 | def test_usetex_preamble(caplog): |
| 204 | mpl.rcParams.update({ |
| 205 | "text.usetex": True, |
| 206 | # Check that these don't conflict with the packages loaded by default. |
| 207 | "text.latex.preamble": r"\usepackage{color,graphicx,textcomp}", |
| 208 | }) |
| 209 | plt.figtext(.5, .5, "foo") |
| 210 | plt.savefig(io.BytesIO(), format="ps") |
| 211 | |
| 212 | |
| 213 | @image_comparison(["useafm.eps"], style='_classic_test') |