Skip to content

plot_equivalence_class

Signature/Parameters

def plot_equivalence_class(self, *args, **kws)

Plot the partially directed Markov equivalence class of the DAG.

Parameters:

Name Type Description Default
*args

Positional arguments forwarded to DAG.plot.

()
**kws

Keyword arguments forwarded to DAG.plot.

{}

Returns:

Type Description
Axes

Axis containing the rendered equivalence class.

Examples:

>>> G = DAG(graph="X -> Z <- Y")
>>> ax = G.plot_equivalence_class(show_plot=False)
>>> ax is not None
True
Source code in causalinf/gcm.py
def plot_equivalence_class(self, *args, **kws):
    """
    Plot the partially directed Markov equivalence class of the DAG.

    Parameters
    ----------
    *args :
        Positional arguments forwarded to ``DAG.plot``.
    **kws :
        Keyword arguments forwarded to ``DAG.plot``.

    Returns
    -------
    matplotlib.axes.Axes
        Axis containing the rendered equivalence class.

    Examples
    --------
    >>> G = DAG(graph="X -> Z <- Y")
    >>> ax = G.plot_equivalence_class(show_plot=False)
    >>> ax is not None
    True
    """
    self.equivalence_class().plot(*args, **kws)