I\'m trying to plot/sketch (matplotlib or other python library) a 2D network of a big distance matrix where distances would be the edges of the sketched network and the line
You can use the networkx package, that work perfectly with this kind of problems. Adjust your matrix to remove a simple numpy array like this:
DistMatrix =array([[0, 0.3, 0.4, 0.7],
[0.3, 0, 0.9, 0.2],
[0.4, 0.9, 0, 0.1],
[0.7, 0.2, 0.1, 0] ])
then import networkx and use it
import networkx as nx
G = G=nx.from_numpy_matrix(DistMatrix)
nx.draw(G)
if you want to draw a weighted version of the graph, you have to specify the color of each edge (at least, I couldn't find a more automated way to do it):
nx.draw(G,edge_color = [ i[2]['weight'] for i in G.edges(data=True) ], edge_cmap=cm.winter )