@@ -843,17 +843,17 @@ def _print_pgf_to_fh(self, fh, *, bbox_inches_restore=None):
843843 writeln (fh , r"\makeatother" )
844844 writeln (fh , r"\endgroup" )
845845
846- def print_pgf (self , fname_or_fh , * args , * *kwargs ):
846+ def print_pgf (self , fname_or_fh , ** kwargs ):
847847 """
848848 Output pgf macros for drawing the figure so it can be included and
849849 rendered in latex documents.
850850 """
851851 with cbook .open_file_cm (fname_or_fh , "w" , encoding = "utf-8" ) as file :
852852 if not cbook .file_requires_unicode (file ):
853853 file = codecs .getwriter ("utf-8" )(file )
854- self ._print_pgf_to_fh (file , * args , * *kwargs )
854+ self ._print_pgf_to_fh (file , ** kwargs )
855855
856- def print_pdf (self , fname_or_fh , * args , metadata = None , ** kwargs ):
856+ def print_pdf (self , fname_or_fh , * , metadata = None , ** kwargs ):
857857 """Use LaTeX to compile a pgf generated figure to pdf."""
858858 w , h = self .figure .get_figwidth (), self .figure .get_figheight ()
859859
@@ -865,7 +865,7 @@ def print_pdf(self, fname_or_fh, *args, metadata=None, **kwargs):
865865 tmppath = pathlib .Path (tmpdir )
866866
867867 # print figure to pgf and compile it with latex
868- self .print_pgf (tmppath / "figure.pgf" , * args , * *kwargs )
868+ self .print_pgf (tmppath / "figure.pgf" , ** kwargs )
869869
870870 latexcode = """
871871\\ PassOptionsToPackage{pdfinfo={%s}}{hyperref}
@@ -891,14 +891,14 @@ def print_pdf(self, fname_or_fh, *args, metadata=None, **kwargs):
891891 cbook .open_file_cm (fname_or_fh , "wb" ) as dest :
892892 shutil .copyfileobj (orig , dest ) # copy file contents to target
893893
894- def print_png (self , fname_or_fh , * args , * *kwargs ):
894+ def print_png (self , fname_or_fh , ** kwargs ):
895895 """Use LaTeX to compile a pgf figure to pdf and convert it to png."""
896896 converter = make_pdf_to_png_converter ()
897897 with TemporaryDirectory () as tmpdir :
898898 tmppath = pathlib .Path (tmpdir )
899899 pdf_path = tmppath / "figure.pdf"
900900 png_path = tmppath / "figure.png"
901- self .print_pdf (pdf_path , * args , * *kwargs )
901+ self .print_pdf (pdf_path , ** kwargs )
902902 converter (pdf_path , png_path , dpi = self .figure .dpi )
903903 with png_path .open ("rb" ) as orig , \
904904 cbook .open_file_cm (fname_or_fh , "wb" ) as dest :
0 commit comments