I am using graph-tool to plot an adjacency matrix from a dataframe. The adjacency matrix looks correct and symmetric, but when I plot it using graph-tool, the resulting visualization is incorrect. (I can look at the dataframe/array to see where there should be connections, but there are none. For example, I know that node 100 should have more than one connection, but it is currently only connected to 99.) I created a dataframe with about 133 columns, that looks approximately like this: an adjacency matrix in a dataframe I used this code to create a symmetric matrix, and it doesn't look like there are any problems there in terms of the matrix. (I think I don't technically need a symmetric matrix if it's undirected, but I thought that was what was causing my issue of missing connections and nodes, initially.) However, when trying to graph the matrix using this code, borrowing from graph-tool, new_array = symmetric_adjacency_matrix.to_numpy() print(new_array) new_g = Graph(scipy.sparse.lil_matrix(new_array),directed=False) graph_draw(new_g,vertex_text=new_g.vertex_index) it creates this image: a graph with connected nodes Unfortunately, when looking at this, I know that the node 100 should be connected to node 116 as well, along with others. But this is not happening, and I am not sure why. Moreover, it is missing nodes, such as 133. 133 exists in my dataframe, but it is not showing up in the graph. Is it due to the conversion from a dataframe to an array? I'm not sure what my issue is here, nor how to fix it. Continue reading...