pywhy_graphs.viz.draw#

pywhy_graphs.viz.draw(G, direction: Optional[str] = None, pos: Optional[dict] = None, name: Optional[str] = None, shape='square', **attrs)[source]#

Visualize the graph.

Parameters:

G : pywhy_nx.MixedEdgeGraph

The mixed edge graph.

direction : str, optional

The direction, by default None. See: https://graphviz.org/docs/attrs/rankdir/.

pos : dict, optional

The positions of the nodes keyed by node with (x, y) coordinates as values. By default None, which will use the default layout from graphviz.

name : str, optional

Label for the generated graph.

shape : str

The shape of each node. By default ‘square’. Can be ‘circle’, ‘plaintext’.

attrs : dict

Any additional edge attributes (must be strings). For more information, see documentation for GraphViz.

Returns:

dot : graphviz.Digraph

DOT language representation of the graph.

Examples using pywhy_graphs.viz.draw#

An introduction to Inducing Paths and how to find them

An introduction to Inducing Paths and how to find them

An introduction to Inducing Paths and how to find them
An introduction to causal graphs and how to use them

An introduction to causal graphs and how to use them

An introduction to causal graphs and how to use them
Drawing graphs and setting their layout for visual comparison

Drawing graphs and setting their layout for visual comparison

Drawing graphs and setting their layout for visual comparison
Drawing timeseries graphs and setting their layout

Drawing timeseries graphs and setting their layout

Drawing timeseries graphs and setting their layout