May-08-2020, 06:33 PM
(This post was last modified: May-08-2020, 06:53 PM by Berlintofind.)
I want to make a plot composed of of dots and connections lines with matplotlib. (It's not a bar chart or normal line chart with axis)
For example, I have a 5*5 matrix, symmetric about the diagonal:
Since it's a bidirectional relation and the matrix is symmetric , if dot 1 has connection with dot 3, then dot 3 should also has connection with dot 1.
How can I make this kind plots?
Thanks in advance!
I think it's can be solved by networkx
For example, I have a 5*5 matrix, symmetric about the diagonal:
Connection = np.array([0,0,1,1,1], [0,0,1,0,1], [1,1,0,1,0], [1,0,1,0,0], [1,1,0,0,0])The element represent the connections relationships, if Connection[ i ][ j ] = 0, means no connections between dot i and dot j. If Connection[ i ][ j ] = 1, then there should be a connection line between dot i and j
Since it's a bidirectional relation and the matrix is symmetric , if dot 1 has connection with dot 3, then dot 3 should also has connection with dot 1.
How can I make this kind plots?
Thanks in advance!
I think it's can be solved by networkx