I am using igraph through python and am trying to get my network into a layout but I keep running into an error.
Here is my code:
import igraph as ig import leidenalg as la leidentest = ig.read("LeidenTestPajek.net") optimiser = la.Optimiser() partition = la.ModularityVertexPartition(leidentest) diff = 1 while diff > 0: diff = optimiser.optimise_partition(partition, n_iterations=-1) print(partition) ig.plot(partition)
When I do this, an image is created but, because there’s 6000 nodes, it’s impossible to read. So I am attempting to apply a layout to the partition that is created and I can’t get anything to work. If I add a line before:
layout = ig.layout_kamada_kawai_3d() ig.plot(partition, layout = layout)
I receive this error:
AttributeError: module 'igraph' has no attribute 'layout_kamada_kawai_3d', which occurs for every single layout type. I’ve tried installing pretty much everything, pycairo, cairocffi and I can’t get it to work.