NNSOM.utils.get_hexagon_shape

NNSOM.utils.get_hexagon_shape()[source]

Return the vertex offsets for drawing a unit hexagon.

The hexagon is centred at the origin. Add the neuron’s (x, y) position to these offsets to draw its hexagonal patch.

Returns:

  • shapex (np.ndarray, shape (6,)) – X-offsets of the six hexagon vertices.

  • shapey (np.ndarray, shape (6,)) – Y-offsets of the six hexagon vertices.