Plotting: pl
Lattice representation
mbnet.pl.lattice(G, save=False)
Plots a Hasse Diagram of a given Lattice.
The node are arranged vertically based on their "level" attribute (partial order).
The nodes are colored based on their "value" attribute (Red : 1; Blue : 0; None : o/w).
Parameters:
-
G(DiGraph) –The input lattice (as a graph) to be visualized.
-
save(bool or str, default:False) –If string is provide, saves the figure to the specified filename. If False, the figure is not saved. Default is False.
Source code in src/mbnet/pl.py
Parameter Graph
mbnet.pl.PG(MBFs, x, y, k=None, save=False)
Plots the parameter graph based on the provided parameter set.
Parameters:
-
MBFs–The input lattice (as a graph) to be visualized.
-
x(str) –Column name in MBFs to use as the x-axis (columns) of the parameter graph.
-
y(str) –Column name in MBFs to use as the y-axis (rows) of the parameter graph.
-
k(tuple(Optional), default:None) –Number of inputs for function of x and y. Used for arraging the axes.
-
save(bool or str, default:False) –If string is provide, saves the figure to the specified filename. If False, the figure is not saved. Default is False.