Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05aecc8 commit 9a6cec0Copy full SHA for 9a6cec0
1 file changed
examples/specialty_plots/hinton_demo.py
@@ -26,7 +26,7 @@ def hinton(matrix, max_weight=None, ax=None):
26
27
for (x, y), w in np.ndenumerate(matrix):
28
color = 'white' if w > 0 else 'black'
29
- size = np.sqrt(np.abs(w))
+ size = np.sqrt(np.abs(w) / max_weight)
30
rect = plt.Rectangle([x - size / 2, y - size / 2], size, size,
31
facecolor=color, edgecolor=color)
32
ax.add_patch(rect)
0 commit comments