# `WolframModel.MultiwayGraphSVG`
[🔗](https://github.com/sragli/wolfram_model/blob/main/lib/wolfram_model/multiway_graph_svg.ex#L1)

SVG rendering of the multiway evolution graph (DAG or tree).

Accepts the DAG structure returned by `WolframModel.multiway_explore_dag/2`:

    %{
      root:  canonical_key,
      nodes: %{canonical_key => %WolframModel{}},
      edges: MapSet.t({from_key, to_key})
    }

Nodes are drawn as rounded boxes labelled with vertex count, edge count, and
generation. Each depth level is a horizontal row. Edges are drawn as
curved arrows. The root node is highlighted.

## Example

    WolframModel.multiway_explore_dag(universe, 3)
    |> WolframModel.MultiwayGraphSVG.to_svg()
    |> then(&File.write!("multiway.svg", &1))

# `to_svg`

```elixir
@spec to_svg(
  %{root: term(), nodes: map(), edges: MapSet.t()},
  keyword()
) :: String.t()
```

Returns an SVG string for `dag`.

Options:
- `:width` — canvas width in pixels. When provided the layout is scaled
  horizontally so the graph fills exactly this width. Computed automatically
  when omitted.
- `:height` — canvas height in pixels. Computed automatically when omitted.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
