(x, C, binary=True, color="C0", s=None)
| 91 | |
| 92 | |
| 93 | def plot_graph(x, C, binary=True, color="C0", s=None): |
| 94 | for j in range(C.shape[0]): |
| 95 | for i in range(j): |
| 96 | if binary: |
| 97 | if C[i, j] > 0: |
| 98 | pl.plot( |
| 99 | [x[i, 0], x[j, 0]], [x[i, 1], x[j, 1]], alpha=0.2, color="k" |
| 100 | ) |
| 101 | else: # connection intensity proportional to C[i,j] |
| 102 | pl.plot( |
| 103 | [x[i, 0], x[j, 0]], [x[i, 1], x[j, 1]], alpha=C[i, j], color="k" |
| 104 | ) |
| 105 | |
| 106 | pl.scatter( |
| 107 | x[:, 0], x[:, 1], c=color, s=s, zorder=10, edgecolors="k", cmap="tab10", vmax=9 |
| 108 | ) |
| 109 | |
| 110 | |
| 111 | pl.figure(1, (12, 8)) |
no outgoing calls
no test coverage detected