This issue is to document my crazy idea to use graphviz for improved auto-layout in nengo GUI. This would have some advantages:
Possibly better layout for hierarchical networks
Generated dot graph descriptions could be re-used to generate high-quality network renderings for publications, etc.
So my proposal would be the following:
When the user clicks the auto-layout button, on the client-side, translate the graph datastructure to an appropriate .dot representation (in memory). The same .dot file can be easily offered for download as well (e.g. via URL.createObjectURL)
Pass the .dot file to a stripped-down graphviz running on the client (the WASM version), tell graphviz to generate layout data only (plain format)
Turn the layout data into the nengo-gui SVG representation
Graphviz is licensed under a permissive licesne (Eclipse Public License), so this shouldn't be an issue.
See [1] for a WASM/asmJS version of graphviz and [2] for a demo. Some functionality can surely be thrown away to reduce the binary size (at the moment 700kB asmJS, WASM is probably 2-3 times smaller)
[1] https://github.com/mdaines/viz.js
[2] http://viz-js.com/
This issue is to document my crazy idea to use graphviz for improved auto-layout in nengo GUI. This would have some advantages:
dot
graph descriptions could be re-used to generate high-quality network renderings for publications, etc.So my proposal would be the following:
.dot
representation (in memory). The same.dot
file can be easily offered for download as well (e.g. viaURL.createObjectURL
).dot
file to a stripped-down graphviz running on the client (the WASM version), tell graphviz to generate layout data only (plain format)Graphviz is licensed under a permissive licesne (Eclipse Public License), so this shouldn't be an issue.
See [1] for a WASM/asmJS version of graphviz and [2] for a demo. Some functionality can surely be thrown away to reduce the binary size (at the moment 700kB asmJS, WASM is probably 2-3 times smaller) [1] https://github.com/mdaines/viz.js [2] http://viz-js.com/