From 0bf1d3d9d883d0b63792c68541b23404aae0ec8f Mon Sep 17 00:00:00 2001 From: JSDurand Date: Fri, 21 Jul 2023 19:14:51 +0800 Subject: Print graphs with edges in order * chain/src/item/default/mod.rs: * graph/src/labelled/binary.rs: * graph/src/labelled/double.rs: * graph/src/lib.rs: If we set the option "ordering" to be "out" in the declaration of nodes at the beginning, then GraphViz will not change the order of children out of nodes. This is much better looking in my opinion. * INSTALL: make insists in changing this file, so let it be. --- graph/src/labelled/binary.rs | 2 +- graph/src/labelled/double.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'graph/src/labelled') diff --git a/graph/src/labelled/binary.rs b/graph/src/labelled/binary.rs index ccbd5cb..5120522 100644 --- a/graph/src/labelled/binary.rs +++ b/graph/src/labelled/binary.rs @@ -208,7 +208,7 @@ impl Graph for PLGraph { let preamble = "digraph nfa { fontname=\"Helvetica,Arial,sans-serif\" - node [fontname=\"Helvetica,Arial,sans-serif\"] + node [fontname=\"Helvetica,Arial,sans-serif\", ordering=out] edge [fontname=\"Helvetica,Arial,sans-serif\"] rankdir=LR;\n"; diff --git a/graph/src/labelled/double.rs b/graph/src/labelled/double.rs index ab2b27c..a641c74 100644 --- a/graph/src/labelled/double.rs +++ b/graph/src/labelled/double.rs @@ -135,7 +135,7 @@ impl Graph for DLGraph { let preamble = "digraph nfa { fontname=\"Helvetica,Arial,sans-serif\" - node [fontname=\"Helvetica,Arial,sans-serif\"] + node [fontname=\"Helvetica,Arial,sans-serif\", ordering=out] edge [fontname=\"Helvetica,Arial,sans-serif\"] rankdir=LR;\n"; -- cgit v1.2.3-18-g5258