You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, plotting doesn't work out of the box for two reasons:
igraph requires the pycairo or cairocffi libraries to be installed, these are not specified in setup.cfg
Upon installing cairocffi, calling parsed_pg.plot() results in the exception quoted further below. Process graph also below.
I've been able to circumvent this problem quite easily by using the networkx library instead.
Happy to raise a PR if we're okay with replacing igraph.
@clausmichele I don't know who uses this library / who is responsible for it these days, could you please tag any folks you think should have a say in this? Much appreciated :)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
File /opt/conda/lib/python3.9/site-packages/IPython/core/formatters.py:343, in BaseFormatter.__call__(self, obj)
341 method = get_real_method(obj, self.print_method)
342 if method is not None:
--> 343 return method()
344 return None
345 else:
File /opt/conda/lib/python3.9/site-packages/igraph/drawing/__init__.py:367, in Plot._repr_svg_(self)
365 context = cairo.Context(surface)
366 # Plot the graph on this context
--> 367 self.redraw(context)
368 # No idea why this is needed but python crashes without
369 context.show_page()
File /opt/conda/lib/python3.9/site-packages/igraph/drawing/__init__.py:276, in Plot.redraw(self, context)
274 else:
275 ctx.save()
--> 276 plotter(ctx, bbox, palette, *args, **kwds)
277 if opacity < 1.0:
278 ctx.pop_group_to_source()
File /opt/conda/lib/python3.9/site-packages/igraph/__init__.py:4166, in Graph.__plot__(self, context, bbox, palette, *args, **kwds)
4164 del kwds["drawer_factory"]
4165 drawer = drawer_factory(context, bbox)
-> 4166 drawer.draw(self, palette, *args, **kwds)
File /opt/conda/lib/python3.9/site-packages/igraph/drawing/graph.py:489, in DefaultGraphDrawer.draw(self, graph, palette, *args, **kwds)
487 src, dest = edge.tuple
488 src_vertex, dest_vertex = vertex_builder[src], vertex_builder[dest]
--> 489 (x, y), (halign, valign) = edge_drawer.get_label_position(
490 edge, src_vertex, dest_vertex
491 )
493 # Measure the text
494 _, yb, w, h, _, _ = label_drawer.text_extents()
File /opt/conda/lib/python3.9/site-packages/igraph/drawing/edge.py:159, in AbstractEdgeDrawer.get_label_position(self, edge, src_vertex, dest_vertex)
155 angle = None
158 # Determine the midpoint
--> 159 if edge.curved:
160 (x1, y1), (x2, y2) = src_vertex.position, dest_vertex.position
161 aux1, aux2 = get_bezier_control_points_for_curved_edge(x1, y1, x2, y2, edge.curved)
AttributeError: 'igraph.Edge' object has no attribute 'curved'
This occurred on the following process graph I was experimenting with:
Currently, plotting doesn't work out of the box for two reasons:
parsed_pg.plot()
results in the exception quoted further below. Process graph also below.I've been able to circumvent this problem quite easily by using the networkx library instead.
Happy to raise a PR if we're okay with replacing igraph.
@clausmichele I don't know who uses this library / who is responsible for it these days, could you please tag any folks you think should have a say in this? Much appreciated :)
This occurred on the following process graph I was experimenting with:
The text was updated successfully, but these errors were encountered: