1414from PIL import Image
1515
1616import matplotlib as mpl
17- from matplotlib import _api , cbook , font_manager as fm
17+ from matplotlib import cbook , font_manager as fm
1818from matplotlib .backend_bases import (
1919 _Backend , FigureCanvasBase , FigureManagerBase , RendererBase
2020)
3232# %f/{:f} format rather than %s/{} to avoid triggering scientific notation,
3333# which is not recognized by TeX.
3434
35-
36- @_api .caching_module_getattr
37- class __getattr__ :
38- NO_ESCAPE = _api .deprecated ("3.6" , obj_type = "" )(
39- property (lambda self : r"(?<!\\)(?:\\\\)*" ))
40- re_mathsep = _api .deprecated ("3.6" , obj_type = "" )(
41- property (lambda self : r"(?<!\\)(?:\\\\)*\$" ))
42-
43-
44- @_api .deprecated ("3.6" )
45- def get_fontspec ():
46- """Build fontspec preamble from rc."""
47- with mpl .rc_context ({"pgf.preamble" : "" }):
48- return _get_preamble ()
49-
50-
51- @_api .deprecated ("3.6" )
52- def get_preamble ():
53- """Get LaTeX preamble from rc."""
54- return mpl .rcParams ["pgf.preamble" ]
55-
56-
5735def _get_preamble ():
5836 """Prepare a LaTeX preamble based on the rcParams configuration."""
5937 preamble = [
@@ -89,11 +67,6 @@ def _get_preamble():
8967mpl_in_to_pt = 1. / mpl_pt_to_in
9068
9169
92- @_api .deprecated ("3.6" )
93- def common_texification (text ):
94- return _tex_escape (text )
95-
96-
9770def _tex_escape (text ):
9871 r"""
9972 Do some necessary and/or useful substitutions for texts to be included in
@@ -102,11 +75,6 @@ def _tex_escape(text):
10275 return text .replace ("\N{MINUS SIGN} " , r"\ensuremath{-}" )
10376
10477
105- @_api .deprecated ("3.6" )
106- def writeln (fh , line ):
107- return _writeln (fh , line )
108-
109-
11078def _writeln (fh , line ):
11179 # Ending lines with a % prevents TeX from inserting spurious spaces
11280 # (https://tex.stackexchange.com/questions/7453).
@@ -295,11 +263,6 @@ def __init__(self):
295263 # Per-instance cache.
296264 self ._get_box_metrics = functools .lru_cache (self ._get_box_metrics )
297265
298- texcommand = _api .deprecated ("3.6" )(
299- property (lambda self : mpl .rcParams ["pgf.texsystem" ]))
300- latex_header = _api .deprecated ("3.6" )(
301- property (lambda self : self ._build_latex_header ()))
302-
303266 def _setup_latex_process (self , * , expect_reply = True ):
304267 # Open LaTeX process for real work; register it for deletion. On
305268 # Windows, we must ensure that the subprocess has quit before being
0 commit comments