paulbrodersen / netgraph

Publication-quality network visualisations in python
GNU General Public License v3.0
660 stars 39 forks source link

Bug: docs positioning example doesn't work #93

Closed jamesbraza closed 1 month ago

jamesbraza commented 1 month ago

Running the docs Positioning example with netgraph==4.13.2 and matplotlib==3.9.0, it looks like the below:

image

This does not look like the docs, the arrows between 0 and 2 are not kept separate.

paulbrodersen commented 1 month ago

Yeah, one of the latest PRs messed that up. Duplicate of issue #90.

  1. Install from the development branch to fix the edge curvature.
pip install https://github.com/paulbrodersen/netgraph/archive/dev.zip
  1. Set the bundle_parallel_edges to False.
g = Graph(
    triangle,
    node_layout=node_positions, edge_layout='curved', edge_layout_kwargs=dict(bundle_parallel_edges=False), 
    node_labels={0 : 'a', 1 : 'b', 2 : 'c'},
    edge_labels=True, edge_label_fontdict=dict(fontweight='bold'),
    ax=ax1,
)

Closing this issue for the moment as I am fairly certain these steps will fix the issue. Feel free to re-open, if they don't.