Display a diagram with blockdiag¶

Links: notebook, html, PDF, python, slides, slides(2), GitHub

blockdiag is module which plots diagrams.

from pyensae.graphhelper import draw_diagram
img = draw_diagram("""
        blockdiag {
            A -> B -> C -> D;
            A -> E -> F -> G;
        }
        """)
img
../_images/draw_diagram_2_0.png

The page blockdiag - simple block-diagram image generator explains the syntax used to describe a graph.

draw_diagram("""
blockdiag admin {
   A -> B -> C -> D;
   A -> E;
   A -> H;

   // A and B belong to first group.
   group {
      A; B;
   }
}
""")
../_images/draw_diagram_4_0.png