Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge "label_dist" not working #508

Open
arjunr2 opened this issue Feb 10, 2022 · 1 comment
Open

Edge "label_dist" not working #508

arjunr2 opened this issue Feb 10, 2022 · 1 comment
Labels
wishlist Feature request that has not been chosen for implementation yet; vote or comment to prioritize it!

Comments

@arjunr2
Copy link

arjunr2 commented Feb 10, 2022

Describe the bug
Setting the "label_dist" on Edge doesn't change rendering

To reproduce

from igraph import *
import math

if __name__ == '__main__':
    g = Graph(directed=True)
    g.add_vertices(4)
    g.add_edges([(2,0), (1,3), (3,1), (0, 1), (1,0)])
    g.vs["name"] = ["A", "B", "C", "D"]
    g.vs["label"] = g.vs["name"]
    #
    g.es["label"] = ["c1", "c2", "c3", "c4"]
    g.es["curved"] = 0.2
    g.es["label_color"] = "blue"
    g.es["label_angle"] = math.pi * 0.5
    # This Feature doesn't work
    g.es["label_dist"] = 2

    visual_style = {}
    visual_style["vertex_size"] = 80
    visual_style["bbox"] = (1000, 700)
    visual_style["margin"] = 60

    print(g)
    layout = g.layout("kk")
    plot(g, **visual_style, layout=layout)

Version information
igraph 0.9.9 installed using pip

@ntamas
Copy link
Member

ntamas commented Feb 11, 2022

label_dist is currently not listed in the list of attributes that affect plotting (see here ). It would be a nice addition, though, so I'm adding it to the wishlist.

@ntamas ntamas added the wishlist Feature request that has not been chosen for implementation yet; vote or comment to prioritize it! label Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wishlist Feature request that has not been chosen for implementation yet; vote or comment to prioritize it!
Projects
None yet
Development

No branches or pull requests

2 participants