TheBrain10 .json (File>Export>JSON Files
) to .dot visualization with Graphviz
- Python 3 support
- UTF-8 support
- Nodes (
thoughts.json)- support shapes, colors
- size depends on PageRank centrality
- Links (
links.json)- support types, directions, colors
- Layout
- support layout (algorithm), splines
Before:
After:
More Complicated Example:
Example: see test/test.py
brain_json2dot(thoughts_path, links_path, dot_path='thebrain.dot', png_path='thebrain.png',
layout='dot', bg_color='grey22', node_shape='circle', node_color='white',
edge_default_color='white', edge_splines='', edge_font_size=10)- Useful reference for parameter customization: Node, Edge and Graph Attributes in Graphviz
- The function will output both
.dotfile +.pngfile - Recommended tool for
.dot: MS Code + Graphviz Interactive Preview
Ubuntu:
apt install -y graphvizWindows:
TODO
Ubuntu:
apt-get install -y graphviz-dev
pip install pygraphvizWindows:
TODO
pip install networkxIf a language involving non-ascii characters is not correctly shown in the visualization, try to install corresponding fonts.
Example (for Chinese):
Ubuntu:
apt-get install -y fonts-wqy-microhei- Doc: parsing of thebrain10's
thoughts.json&links.json - Doc: Windows / Mac installation
- Dev: SVG
- Dev: publish package to PYPI
- Dev: correct color mapping (thebrain exported json seems to have bugs about color)
- Layout: label / tag
- Layout: parent / sibling location restriction in visualization
- Layout: community detection

