Search code examples
pythonlabeligraphedges

Plot edge labels or similar with Igraph for Python


I would like simply to plot labels not to the vertex of the graph but to the edge.

Simple enough case: Kamada Kawai layout for undirected graph.

I'm fantasizing about something like this:

visual_style["edge_label"] = g.es["weightthing"]

To try to justify my question as I was researching much but found only this:

The edge labels. They will be converted to character. Specify NA to omit edge labels.

Edge labels are omitted by default.

from here

I fail to understand the above quote. Sorry.

  • Is it possible to plot label to edge?
  • Aprox. how?

Solution

  • Unfortunately edge labels are not supported yet in the Python interface of igraph. (By the way, you were reading the documentation for the R interface).

    Update: the development version of igraph (i.e. version 0.7) now supports edge labels.