Graphing Models

pymc3.model_graph.model_to_graphviz(model=None, *, formatting: str = 'plain')

Produce a graphviz Digraph from a PyMC3 model.

Requires graphviz, which may be installed most easily with

conda install -c conda-forge python-graphviz

Alternatively, you may install the graphviz binaries yourself, and then pip install graphviz to get the python bindings. See for more information.


The model to plot. Not required when called from inside a modelcontext.


one of { “plain”, “plain_with_params” }