// from one test to another.
backend_agg.RendererAgg._fontd.clear()
backend_pdf.RendererPdf.truetype_font_cache.clear()
backend_svg.RendererSVG.fontd.clear()
// make sure we don"t carry over bad plots from former tests
msg = ("no of open figs: {} -> find the last test with " "
"python tests.py -v" and add a "@cleanup" decorator.")
assert len(plt.get_fignums()) == 0, msg.format(plt.get_fignums())
After Change
mpl.rcdefaults() // Start with all defaults
mpl.rcParams["text.hinting"] = True
mpl.rcParams["text.antialiased"] = True
mpl.rcParams["text.hinting_factor"] = 8
// make sure we don"t carry over bad plots from former tests
msg = ("no of open figs: {} -> find the last test with " "
"python tests.py -v" and add a "@cleanup" decorator.")