MCPcopy Create free account
hub / github.com/PythonOT/POT / plot_graph

Function plot_graph

examples/backends/plot_optim_gromov_pytorch.py:79–86  ·  view source on GitHub ↗
(x, C, color="C0", s=None)

Source from the content-addressed store, hash-verified

77
78
79def plot_graph(x, C, color="C0", s=None):
80 for j in range(C.shape[0]):
81 for i in range(j):
82 if C[i, j] > 0:
83 pl.plot([x[i, 0], x[j, 0]], [x[i, 1], x[j, 1]], alpha=0.2, color="k")
84 pl.scatter(
85 x[:, 0], x[:, 1], c=color, s=s, zorder=10, edgecolors="k", cmap="tab10", vmax=9
86 )
87
88
89pl.figure(1, (10, 5))

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected