flow icon indicating copy to clipboard operation
flow copied to clipboard

simplify and improve readability of dot graphs

Open andrewdavidmackenzie opened this issue 4 years ago • 2 comments

For example prime/context.dot to something like this

digraph prime { rankdir=TB; node [shape = circle]; // Connections "/prime/args" -> "/prime/to_number" [headlabel=""]; "/prime/to_number" -> "/prime/candidates" [taillabel = "from", headlabel="end"]; "/prime/candidates" -> "/prime/all-numbers" [headlabel="values"]; "/prime/to_number" -> "/prime/all-numbers" [headlabel="chunk_size"]; "/prime/all-numbers" -> "/prime/all-numbers" [headlabel="chunk_size"]; "/prime/all-numbers" -> "/prime/all-numbers" [headlabel="partial"]; "/prime/to_number" -> "/prime/composites" [headlabel="limit"]; "/prime/all-numbers" -> "/prime/subtract" [headlabel="array"]; "/prime/composites" -> "/prime/subtract" [headlabel="value"]; "/prime/subtract" -> "/prime/subtract" [headlabel="array"]; "/prime/composites" -> "/prime/print" [headlabel=""]; } // close digraph

just declaring the node when need to have a different shape or color.

andrewdavidmackenzie avatar May 05 '20 08:05 andrewdavidmackenzie

[ ] text labels overlap all over the place [ ] set standard A4 landscape aspect ratio [ ] get bubbles to be bigger and text to fit better. [ ] Flows with initializers (e.g. multiply in matrix_mult) don't show the initializers in the context diagram but then shows them in each use in the sub-flow [ ] each connection from an output repeats the name, move to inside of bubble for process and make bubble bigger? [ ] often the output ports for two outputs coincide as the hash coincides [ ] often the input ports for two inputs coincide as the hash of the name coincides -> use input number % for inputs to sub-processes [ ] output has its name drawn for each connection using it, reduce to just draw the name once [ ] move text for input away from arrow [ ] all outputs come from same point (sometimes). (hash coincides? hard to fix?) Maybe remove multiple points and simplify? put output name on each arrow if not overridden by a connection name? will move text around and spread out more [ ] sometimes two inputs put at same point. e.g. compare in composites (hash coincides? hard to fix?)

andrewdavidmackenzie avatar Mar 17 '23 17:03 andrewdavidmackenzie

In dot diagrams, initializers are moved to destination, not where defined

  • OK in function diagram, but not the nested flow diagrams.
  • See https://github.com/andrewdavidmackenzie/flow/issues/1202 for example

andrewdavidmackenzie avatar Mar 17 '23 17:03 andrewdavidmackenzie