export_pdf#
- export_pdf(diagrams, filename, rotation=0.0, arc_color='tab:blue', arc_width=4.0, arc_style='solid', arc_alpha=None, arc_stroke_color='white', arc_stroke_width=None, arc_stroke_alpha=None, gap=0.1, cmap=None, vertex_color='black', vertex_size=0.15, vertex_alpha=None, vertex_stroke_color='black', vertex_stroke_width=0, vertex_stroke_alpha=None, arrow_color=None, arrow_width=0.15, arrow_length=0.12, arrow_style='open', arrow_cap_style='round', arrow_position='middle', arrow_alpha=None, label_endpoints=False, label_arcs=False, label_nodes=False, label_color='black', label_font_size=14, label_font_family='serif', label_horizontal_alignment='left', label_vertical_alignment='top', label_alpha=None, title=(False,), title_color='black', title_font_size=(16,), title_font_family='serif', title_alpha=None, show_circle_packing=False, padding_fraction=0.05, show_axis=False, show_progress=True, ignore_errors=False)#
Render planar diagram(s) to a multi-page PDF (one diagram per page).
If any diagram cannot be drawn (e.g., contains unsupported features), a placeholder page with an “X” and a brief error message is written instead.
- Parameters:
diagrams – A PlanarDiagram or an iterable of PlanarDiagram objects.
filename (str) – Output PDF path.
draw_circles – If True, also draws auxiliary packing circles (debugging).
with_labels – If True, draw node/endpoint/arc labels.
with_title – If True, add a title: uses k.name if present, otherwise uses the diagram’s KnotPy notation.
show_progress – If True and 10+ diagrams, shows a progress bar.
- Returns:
None
- Return type:
None