'Polygonal scatter diagram with python

I have a matrix of N observations and F features. Among the N observations, 5 represent reference samples that I wish to compare with others (with distance or similarity measures). Depending on how close the N features are from the 5 references, I would like to plot them on a polygonal diagram to have a better perception of how they are distributed between the 5 cases (i.e. how distant they are). This is an example of result I would like to get:

enter image description here

Each corner represent a reference while black dots are the samples to locate between such references. How can I produce this type of diagram in python?

Also, would it be possible to produce such diagram by modulating the number of corners (lower or higher than 5)?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source