Skip to content

Different labels for bidirectional arrows #92

@jamesbraza

Description

@jamesbraza

This code, with netgraph==4.13.2 and matplotlib==3.9.0:

from netgraph import Graph
import matplotlib.pyplot as plt

edges = [("in", "out"), ("out", "in")]
edge_labels = {
    ("in", "out"): 3,
    ("out", "in"): 5,
}
graph = Graph(
    edges, node_labels=True, edge_labels=edge_labels, arrows=True, node_label_offset=(1e-4, 0)
)
plt.show()

Renders like so:

image

We can see it clobbered the 3 label. Any chance we can support bidirectional arrows, that have a different label per direction?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions