0

I have a distance matrix between 500 items as a 500*500 numpy matrix. I would like to visualize it as a graph of nodes (since it is a complete connected graph, there is no point in drawing edges) which respects the distance between nodes.

I saw many posts related to this question, but most of the answers are partly working/not working.

Visualize distance matrix as a graph

Drawing a graph or a network from a distance matrix?

I know the fact that, it is not mathematically possible to visualize such a graph from the pairwise distance only. But I am OK with an approximation result which works for any number of nodes.

Any help ?

Community
  • 1
  • 1
Shew
  • 1,557
  • 1
  • 21
  • 36
  • 1
    I don't understand your question. `since it is a complete connected graph, there is no point in drawing edges` - A graph without edges makes very little sense. – cel Nov 19 '15 at 09:15
  • what i meant is, there will be too many edges. My ultimate aim is to see the clusters in the data. I am Ok with edges. – Shew Nov 19 '15 at 09:18
  • [This](https://stackoverflow.com/questions/18911994) seems like an exact duplicate of what you're asking. What about the answer given there doesn't work? If you adjust this question to be a followup to the earlier question, rather than asking the same thing, it can be taken off hold. – David Z Nov 19 '15 at 09:18
  • Where does the matrix come from? Are the distances consistent with Euclidean geometry, i.e. is there a configuration of 500 points in the plane such that the Euclidean distances between the points is your distance matrix (or at least an approximation thereof)? – Sven Marnach Nov 19 '15 at 09:19
  • Distance is cosine distance between the points, and hence it is consistent with euclidean geometry. the points lie in a n-dimensional plane. – Shew Nov 19 '15 at 09:24
  • Maybe take a look at the graph visualization in this paper: http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0123507 (Fig. 2). – Sven Marnach Nov 19 '15 at 09:45

0 Answers0