Is it possible to display tooltips on a networkx chart?

I have a simple graph with many dots, so I don’t want to show shortcuts for all of them. But I want to find out what is, using tooltips.

Is it possible to add / display tooltips using networkx?

Here is my code:

import networkx as nx g = nx.Graph() g.add_node(1, label="descriptive label") nx.draw(g) 

I would like the “descriptive label” to appear as a tooltip. Any ideas?

+6
python tooltip networkx
source share
1 answer

NetworkX has no embedded firmware, NetworkX uses matplotlib, so you can try the following sentence:

Points and line tips in matplotlib?

and adapt it to your code, hope this helps.

+3
source share

All Articles