causalnex.plots.display_plot_mpl

causalnex.plots.display_plot_mpl(viz, prog='neato', ax=None, pixel_size_in=0.01)[source]

Displays a pygraphviz object using matplotlib.

Parameters
  • viz (AGraph) – pygraphviz object to render.

  • prog (str) – The graph layout. Avaliable are:

  • dot

  • neato

  • fdp

  • sfdp

  • and circo (twopi) –

  • ax (Optional[Axes]) – Optional matplotlib axes to plot on.

  • pixel_size_in (float) – Scaling multiple for the plot.

Return type

Tuple[Figure, Axes]

Returns

IPython Image object. Renders in a notebook.

Raises

ImportError – if matplotlib is not installed (optional dependency).