sevamoo / SOMPY

A Python Library for Self Organizing Map (SOM)
Apache License 2.0
535 stars 242 forks source link

Distance between hexagon centers #132

Open wayneking517 opened 3 years ago

wayneking517 commented 3 years ago

When running:

sm = SOMFactory().build(data, mapsize=[10,10], normalization = 'var', initialization='random', component_names=names, lattice="hexa")
sm.train(n_job=1, verbose=False, train_rough_len=2, train_finetune_len=5)

from sompy.visualization.mapview import View2D
view2D  = View2D(10,10,"",text_size=10)
view2D.show(sm, col_sz=5, which_dim="all", denormalize=True)
plt.tight_layout()
plt.show()

I get overlapping hexagons. I'd like to adjust their spacing so that they just touch or even have a little space between them.

I have reviewed the source codes and can't seem to find where to make that adjustment.