Skip to main content

Module visualization

Module visualization 

Source
Expand description

Graph visualization with layout algorithms and SVG export

This module provides algorithms for computing node positions for graph visualization and exporting graphs to SVG and DOT formats.

§Layout Algorithms

  • ForceDirected: Fruchterman-Reingold force-directed placement
  • Hierarchical: Layer-based layout for DAGs and trees
  • Circular: Nodes evenly distributed around a circle
  • Spectral: Eigenvector-based layout using graph Laplacian

§Export Formats

  • SVG with fully customizable node/edge styling
  • DOT format with layout hints

Structs§

DotConfig
Configuration for DOT format export
GraphLayout
Computed graph layout: maps each node to its 2D position
LayoutPosition
2D node position in layout space
SvgConfig
Configuration for SVG graph rendering

Enums§

LayoutAlgorithm
Available graph layout algorithms

Functions§

compute_layout
Compute a graph layout using the specified algorithm
export_dot
Export a graph to DOT format with optional layout hints
render_svg
Render a graph to SVG using the provided layout and configuration