holoviz / holoviz/hvplot

Attribute 'connectionstyle' ignored, impossible to curve the graph edges.

Open
#683 4 comments 0 reactions 0 assignees View on GitHub
interface: networkx
Dominant language
Python
Stars
1.4k
Forks
124
Avg merge
1d 18h
Merged PRs (30d)
1

Description

#### ALL software version info
python 3.10
bokeh 2.4.2
networkx 2.6.2

#### Description of expected behavior and the observed behavior
I tried to draw directed graph along with the multipartite layout from networkx. The graph is rendered however all the edges overlap between each other. To correct this behavior, I added the 'connectionstyle' attribute in order to curve the edges in function draw_networkx_edges but the edges are still straight.

#### Complete, minimal, self-contained example code that reproduces the issue

```
defaults = dict(width=1600, height=1000)
hv.opts.defaults(opts.EdgePaths(**defaults), opts.Graph(**defaults), opts.Nodes(**defaults))pos = nx.layout.multipartite_layout(self.nx_cfg, subset_key="address", align="horizontal", scale=4)

nodes = hvnx.draw_networkx_nodes(self.nx_cfg, pos, node_size=30, node_color='blue')
edges = hvnx.draw_networkx_edges(self.nx_cfg, pos, node_size=30, arrows=True, arrowstyle=']->',
arrowsize=10, edge_color="green", connectionstyle="arc3",
edge_cmap='Blues', edge_width=2, colorbar=True)

show(hv.render(nodes * edges))
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.