How to add labels to networkx graph

What are you trying to do?
I use bokeh.plotting.from_networkx API to draw network graph. And I want to add label to the nodes. But I cannot find how to achieve it from bokeh API document.

BTW, If use networkx with matplotlib, I can achieve what I want. But I prefer the styling of bokeh :slight_smile:

I attach the picture to show case what I want. In this pic, I want to add label β€œA”/ β€œB” to the node.

There’s work in progress on this in PR Add support for outline shapes to `Text`-like glyphs by mattpap Β· Pull Request #13620 Β· bokeh/bokeh Β· GitHub, which hopefully will be a part of bokeh 3.4.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.