To install IGraph/M manually, or to install a different version than the latest one, download the.paclet file from the GitHub releases page, and install it using the PacletInstall Mathematica function. For example, ifIGraphM-0.6.2.paclet was downloaded into the directory ~/Downloads, then evaluate
If the .paclet file was downloaded to a different location, adjust the path above accordingly. It is not necessary to uninstall old versions before installing a new one. A more detailed guide for installing packages distributed in the paclet format is available on StackExchange. Once installed, test that it works with a few simple commands:
This is a very symmetric graph. The graph structure looks exactly the same when viewed from any vertex. In other words, the graph is vertex-transitive.
In[]:=
IGVertexTransitiveQ[g]
Out[]=
True
The same is not true for edges though.
In[]:=
IGEdgeTransitiveQ[g]
Out[]=
False
There are in fact two types of edges: those separating a hexagonal face from a pentagonal one, and those separating two hexagonal faces. We can visualize them:
Each list in the result contains the ordered vertices of a face.
We can also compute a Tutte layout of the graph, with an arbitrary choice of outer face. A planar graph can be drawn with any of its faces being the outer face.
In[]:=
IGLayoutTutte[g,"OuterFace"->{4,58,22,32,8}]
Out[]=
In a typical Tutte layout, the vertices are often closely packed in the middle. It would be nice to space them out.
IGLayoutTutte
supports edge weights. We can simply compute an initial layout, then assign the Euclidean distance of each edge’s endpoints as its weight, finally compute a weighted Tutte layout.
In[]:=
IGLayoutTutte@IGDistanceWeighted@IGLayoutTutte[g]
Out[]=
We can even transform the edge weights to adjust between a closely spaced and a loosely spaced layout. This is easy with
The original graph, however, can be both vertex-coloured and edge-colored using only 3 colours.
In[]:=
{IGChromaticNumber[g],IGChromaticIndex[g]}
Out[]=
{3,3}
The vertex colouring of the dual graph of a polyhedral skeleton is actually a face colouring of the polyhedron. Let us visualize the colouring like this.
The concept of the relative neighbourhood graph was developed to model human perception of a set of points. Let us compute both this graph, and the Gabriel graph.
The connections we get this way are not the same as the original graph, but at least in the middle of the point set, the connections are reconstructed well.
β-skeletons are proximity graphs that interpolate smoothly between the two graphs above, and beyond.
An exact definition of all of these proximity graphs used above is found in the IGraph/M documentation. Open it to see many more functions with many more examples by evaluating: