graphcat.notebook module

Integration with Jupyter notebooks, https://jupyter.org

graphcat.notebook.display(graph, hide=None, rankdir='LR')[source]

Display a computational graph inline in a Jupyter notebook.

This is extremely useful for understanding and debugging graphs. The structure and current state of the graph is displayed as an inline SVG graphic. See graphcat.diagram.draw() for details.

Parameters:
  • graph (graphcat.Graph or pygraphviz.AGraph, required) – The graph to be visualized.
  • hide (Python callable, optional) – Python callable that can be used to hide tasks in the displayed figure. If None (the default), all tasks will be displayed. Ignored if graph is a pygraphviz.AGraph.
  • rankdir (str, optional) – Graphviz rankdir attribute that determines the direction of data flow within the diagram. Default: "LR", which is left-to-right flow. Ignored if graph is a pygraphviz.AGraph.