Really confused on this. My application reads a file into a graph, and then I create a 3D layout for it, and then modifies the center. However when I load in one of my datasets I get this error: “the given point must have 2 dimensions” from the second line:
I managed to reproduce this. This happens if your graph is empty. In igraph, the layout is simply a list of lists, wrapped in a Layout object, and the dimensionality of the layout is given by the first element of the list. If the list is empty, the Layout object falls back to assuming that it’s a 2D layout.