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.
题
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.
解决方案
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.
其他提示
You can use NetworkX instead. (EDIT) You may like to use this function:
networkx.draw_networkx_edge_labels()
The docstring shows the use of the parameter edge_labels
:
edge_labels : dictionary
Edge labels in a dictionary keyed by edge two-tuple of text
labels (default=None). Only labels for the keys in the dictionary
are drawn.