I am using hvplot (version 0.4.0) with a networkx undirected graph (networkx version 2.1). When plotting the graph using the bokeh backend, I would like the hover to display the node name and not "index:number".
All the examples online in the docs have "index:number", I have tried to pass the names to the "labels" kwargs but that results in an error:
DataError: Supplied data does not contain specified dimensions, the following dimensions were not found:
import networkx as nx
import hvplot.networkx as hvnx
import holoviews as hv
hv.extension('bokeh')
GG = nx.Graph()
GG.add_edge('A','B')
GG.add_edge('B','C')
GG.add_edge('C','A')
hvnx.draw(GG)
Looping through the GG object, provides the following info
for ii in GG.nodes():
print(ii,type(ii))
A <class 'str'>
C <class 'str'>
B <class 'str'>
for ee in GG.edges():
print(ee,type(ee))
('A', 'C') <class 'tuple'>
('A', 'B') <class 'tuple'>
('C', 'B') <class 'tuple'>