Graph-tool Fixing position of vertex sfdp_layout: pin=True, pos and multilevel=False

33 Views Asked by At

I'm trying to fix positions of some nodes by using arguments: pin, pos and multilevel like below:

pos = g.vertex_properties["vertex_plot_position"] # a vector[double]
pin = g.vertex_properties["v_filter_graph"]  # a bool VertexPropertyMap

pos = sfdp_layout(g, pos=pos, pin=pin, multilevel=True)
graph_nodes_coord = graph_draw(g, vertex_text=g.vp.v_label, vertex_size=20, output_size=(1400, 1400),
            edge_pen_width=8,
            pos=pos,
            vertex_fill_color=g.vertex_properties['vertex_plot_color'],
            edge_color=g.edge_properties['arc_plot_color'],
            output=output_file_path)

When multilevel = True it is work but not fix positions, witch is not my target. And when multilevel = False, i receive this error x, y, w, h = fit_view TypeError: cannot unpack non-iterable bool object. Please can someone explain me what is wrong?

0

There are 0 best solutions below