-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Erin Wild
committed
Feb 19, 2019
1 parent
ca600a6
commit c0c6b28
Showing
5 changed files
with
53 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,7 @@ def show(self, som, data=None, anotate=True, onlyzeros=False, labelsize=7, cmap= | |
plt.imshow(clusters.reshape(msz[0], msz[1])[::], alpha=.5) | ||
|
||
elif som.codebook.lattice == "hexa": | ||
ax, cents = plot_hex_map(np.flip(clusters.reshape(msz[0], msz[1])[::], axis=1), fig=self._fig, colormap=cmap, colorbar=False) | ||
ax, cents = plot_hex_map(np.flip(clusters.reshape(msz[0], msz[1])[::], axis=1), | ||
This comment has been minimized.
Sorry, something went wrong. |
||
fig=self._fig, colormap=cmap, colorbar=False) | ||
if anotate: | ||
self._set_labels(cents, ax, clusters, onlyzeros, labelsize, hex=True) | ||
This comment has been minimized.
Sorry, something went wrong.
ricardomourarpm
Contributor
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Observing the order of the nodes in BmuHitsView (node 0 in bottom right), I changed the following
plot_hex_map(np.flip(clusters.reshape(msz[0], msz[1])[::], axis=0), fig=self._fig, colormap=cmap, colorbar=False)
and then change to
self._set_labels(cents, ax, reversed(clusters), onlyzeros, labelsize, hex=False)
This way we have same position for nodes in BmuHitsView and HitMapView.