@@ -77,16 +77,6 @@ def get_preamble():
7777re_mathsep = re .compile (NO_ESCAPE + r"\$" )
7878
7979
80- @cbook .deprecated ("3.2" )
81- def repl_escapetext (m ):
82- return "\\ " + m .group (1 )
83-
84-
85- @cbook .deprecated ("3.2" )
86- def repl_mathdefault (m ):
87- return m .group (0 )[:- len (m .group (1 ))]
88-
89-
9080_replace_escapetext = functools .partial (
9181 # When the next character is _, ^, $, or % (not preceded by an escape),
9282 # insert a backslash.
@@ -426,16 +416,12 @@ def __init__(self, figure, fh, dummy=False):
426416 self .figure = figure
427417 self .image_counter = 0
428418
429- self ._latexManager = LatexManager ._get_cached_or_new () # deprecated
430-
431419 if dummy :
432420 # dummy==True deactivate all methods
433421 for m in RendererPgf .__dict__ :
434422 if m .startswith ("draw_" ):
435423 self .__dict__ [m ] = lambda * args , ** kwargs : None
436424
437- latexManager = cbook ._deprecate_privatize_attribute ("3.2" )
438-
439425 def draw_markers (self , gc , marker_path , marker_trans , path , trans ,
440426 rgbFace = None ):
441427 # docstring inherited
@@ -803,14 +789,7 @@ def get_default_filetype(self):
803789 return 'pdf'
804790
805791 @_check_savefig_extra_args
806- @cbook ._delete_parameter ("3.2" , "dryrun" )
807- def _print_pgf_to_fh (self , fh , * ,
808- dryrun = False , bbox_inches_restore = None ):
809-
810- if dryrun :
811- renderer = RendererPgf (self .figure , None , dummy = True )
812- self .figure .draw (renderer )
813- return
792+ def _print_pgf_to_fh (self , fh , * , bbox_inches_restore = None ):
814793
815794 header_text = """%% Creator: Matplotlib, PGF backend
816795%%
@@ -875,9 +854,6 @@ def print_pgf(self, fname_or_fh, *args, **kwargs):
875854 Output pgf macros for drawing the figure so it can be included and
876855 rendered in latex documents.
877856 """
878- if kwargs .get ("dryrun" , False ):
879- self ._print_pgf_to_fh (None , * args , ** kwargs )
880- return
881857 with cbook .open_file_cm (fname_or_fh , "w" , encoding = "utf-8" ) as file :
882858 if not cbook .file_requires_unicode (file ):
883859 file = codecs .getwriter ("utf-8" )(file )
@@ -933,9 +909,6 @@ def _print_pdf_to_fh(self, fh, *args, metadata=None, **kwargs):
933909
934910 def print_pdf (self , fname_or_fh , * args , ** kwargs ):
935911 """Use LaTeX to compile a Pgf generated figure to PDF."""
936- if kwargs .get ("dryrun" , False ):
937- self ._print_pgf_to_fh (None , * args , ** kwargs )
938- return
939912 with cbook .open_file_cm (fname_or_fh , "wb" ) as file :
940913 self ._print_pdf_to_fh (file , * args , ** kwargs )
941914
@@ -961,9 +934,6 @@ def _print_png_to_fh(self, fh, *args, **kwargs):
961934
962935 def print_png (self , fname_or_fh , * args , ** kwargs ):
963936 """Use LaTeX to compile a pgf figure to pdf and convert it to png."""
964- if kwargs .get ("dryrun" , False ):
965- self ._print_pgf_to_fh (None , * args , ** kwargs )
966- return
967937 with cbook .open_file_cm (fname_or_fh , "wb" ) as file :
968938 self ._print_png_to_fh (file , * args , ** kwargs )
969939
0 commit comments