# IGFaces gives weird result

I'm using the IGraph/M package to perform some calculations on graphs. Specifically, I want to use IGFaces to determine how many edges/vertices each face has for some calculations later down the line. What's going wrong is that the faces that it produces are not the ones I expect.I am able to reproduce this here:

g = Graph[
Range[5],
{1 \[UndirectedEdge] 2, 2 \[UndirectedEdge] 3,
3 \[UndirectedEdge] 1, 2 \[UndirectedEdge] 4,
4 \[UndirectedEdge] 3, 3 \[UndirectedEdge] 5,
5 \[UndirectedEdge] 4},
VertexCoordinates -> {{1.993577, 27.381231}, {2.920982,
27.005762}, {2.048629, 26.343576}, {2.96684,
25.922899}, {2.108422, 25.318638}},
VertexLabels -> "Name"]
IGFaces[g]

Output:

{{1, 2, 3}, {1, 3, 4, 2}, {2, 4, 5, 3}, {3, 5, 4}}

I do not expect these faces at all, I was expecting (and hoping) that I would get all the triangles you see there and big face that covers the "outer" edge, something like

{{1, 2, 3}, {2, 3, 4}, {3, 4, 5}, {1, 2, 4, 5, 3}}

I thought that by providing coordinates explicitly I would not have issues since it fixes the embedding. Any thoughts on what is going wrong?

Note that this graph is actually part of a bigger graph and the code is part of a bigger much messier code so it might be hard to provide additional details.

I'm using "IGraph/M 0.5.1 (October 12, 2020)" and Mathematica 12.3

• PlanarFaceList is another alternative. Though for large graphs, IGFaces is much faster. Jun 7, 2022 at 16:17
• @GregHurst PlanarFaceList is part of Mathematica 13.0 (which I don't have) which is one of the main reasons I was using IGraph in the first place, but nonetheless a nice alternative. Jun 10, 2022 at 9:00