Visualizer#

visualizer module#

class mmodel.visualizer.Visualizer(format_node, format_edge, graph_settings={'graph_attr': {'labeljust': 'l', 'labelloc': 't', 'ordering': 'out', 'splines': 'ortho'}, 'node_attr': {'shape': 'box'}})[source]#

Bases: object

Visualizer class for drawing a NetworkX graph.

mmodel.visualizer.format_label(label)[source]#

Format label for graphviz.

The function replaces newlines with the graphviz left-aligned line break. However, if the “n” is escaped, change it to “\\n”.