pyGM: Drawing

pyGM.draw.drawBayesNet(model, **kwargs)[source]

Draw a Bayesian Network (directed acyclic graph) using networkx function calls

Args:
**kwargs: remaining keyword arguments passed to networkx.draw()

Example:

>>> gm.drawBayesNet(model, labels={0:'0', ... } )    # keyword args passed to networkx.draw()
pyGM.draw.drawFactorGraph(model, var_color='w', factor_color=(0.2, 0.2, 0.8), **kwargs)[source]

Draw a factorgraph using networkx function calls

Args:
var_color (str, tuple): networkx color descriptor for drawing variable nodes factor_color (str, tuple): networkx color for drawing factor nodes var_labels (dict): variable id to label string for variable nodes factor_labels (dict): factor id to label string for factor nodes **kwargs: remaining keyword arguments passed to networkx.draw()

Example:

>>> gm.drawFactorGraph(model, var_labels={0:'0', ... } )    # keyword args passed to networkx.draw()
pyGM.draw.drawLimid(model, C, D, U, **kwargs)[source]

Draw a limited-memory influence diagram (limid) using networkx

Args:
**kwargs: remaining keyword arguments passed to networkx.draw()

Example:

>>> model.drawLimid(C,D,U, var_labels={0:'0', ... } )    # keyword args passed to networkx.draw()
pyGM.draw.drawMarkovGraph(model, **kwargs)[source]

Draw a Markov random field using networkx function calls

Args:
**kwargs: remaining keyword arguments passed to networkx.draw()

Example:

>>> gm.drawMarkovGraph(model, labels={0:'0', ... } )    # keyword args passed to networkx.draw()