export_pdf_groups#
- export_pdf_groups(groups, filename, draw_circles=False, with_labels=False, with_title=False, show_progress=True)#
Draw the planar diagram(s) using Matplotlib and save to a PDF file.
This function takes a planar diagram or a list of planar diagrams, draws them using Matplotlib, and exports the resulting visualizations to a PDF file. The drawing behavior can be customized using the optional parameters. If the diagrams contain unsupported features such as loops or bridges, they will be skipped, and a warning message will be generated. Progress indicators can be displayed if the export involves multiple diagrams.
Parameters: diagrams: PlanarDiagram | list[PlanarDiagram]
A planar diagram or a list of planar diagrams to be drawn.
- filename: str
The name of the output PDF file where the drawings will be saved.
- draw_circles: bool, optional
If True, circles will be drawn around the diagrams. Defaults to False.
- with_labels: bool, optional
If True, labels will be displayed on the diagrams. Defaults to False.
- with_title: bool, optional
If True, titles will be added to the diagrams. Defaults to False.
- show_progress: bool, optional
If True, progress indicators will be displayed if the number of diagrams is 10 or more. Defaults to True.
Returns: None