Creating Visualisations of Random Graphs

105 Views Asked by At

I've got some code in C that produces a whole load of random geometric graphs and finds the proportion that percolate in order to estimate the full connection probability.

However I need to produce some kind of visualisation i.e. images of the graphs (not all of them, essentially just one example). Moreover I need to check (not essential) that the graphs produced look right (according to my domain).

Does anyone know of a good way of taking an adjacency matrix and a position matrix (the nodes have positions in Euclidean space) and producing some kind of visualisation?

Sorry to post this here, I thought someone from maths may have done this before.

Cheers.

2

There are 2 best solutions below

2
On BEST ANSWER

If you have access to Mathematica, then you just need to perform $$ \verb bAdjacencyGraph[A,VertexCoordinates->Coordinates]b $$ where $A$ is your adjacency matrix, and $\verb bCoordinatesb$ is a list of the form $$ \{\{x_1,y_1\},\{x_2,y_2\},\ldots,\{x_n,y_n\}\} $$

0
On

If you simply need to visualize an adjacency matrix, you can use a tool like Gephi. You can write a simple MATLAB script that would write your adjacency matrix and position matrix into a gdf file and then use Gephi to visualize. Alternatively, you can even import your data from an Excel sheet or specify internally.

Hope this helps!