The command draw_networkx_edge_labels
needs the argument edge_labels
rather than labels
.
So you need to change nx.draw_networkx_edge_labels(G, pos, labels = edge_labels)
to nx.draw_networkx_edge_labels(G, pos, edge_labels = edge_labels)
More Related Contents:
- Networkx: Overlapping edges when visualizing MultiGraph
- Using NetworkX with matplotlib.ArtistAnimation
- Bipartite graph in NetworkX
- pylab/networkx; no node labels displayed after update
- How to plot in multiple subplots
- How can I plot separate Pandas DataFrames as subplots?
- surface plots in matplotlib
- Heatmap in matplotlib with pcolor?
- Histogram Matplotlib
- Format y axis as percent
- Aligning rotated xticklabels with their respective xticks
- matplotlib: overlay plots with different scales?
- How can I remove the top and right axis in matplotlib?
- Can one get hierarchical graphs from networkx with python 3?
- Python Matplotlib figure title overlaps axes label when using twiny
- Managing dynamic plotting in matplotlib Animation module
- How to display a 3D plot of a 3D array isosurface in matplotlib mplot3D or similar?
- matplotlib.pyplot will not forget previous plots – how can I flush/refresh?
- custom matplotlib plot : chess board like table with colored cells
- 3D animation using matplotlib
- How to plot and annotate grouped bars in seaborn / matplotlib
- How do you plot a vertical line on a time series plot in Pandas?
- Updating z data on a surface_plot in Matplotlib animation
- Repeating x axis labels for all facets using FacetGrid in seaborn
- Plotting: ValueError: x and y must have same first dimension
- Python saving multiple figures into one PDF file
- How to force integer tick labels
- Networkx : Convert multigraph into simple graph with weighted edges
- datetime x-axis matplotlib labels causing uncontrolled overlap
- Python package to plot two heatmaps in one (split each square into two triangles)