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

spring layout breaks with single node graph #2079

Closed
hagberg opened this issue Apr 15, 2016 · 0 comments
Closed

spring layout breaks with single node graph #2079

hagberg opened this issue Apr 15, 2016 · 0 comments

Comments

@hagberg
Copy link
Member

hagberg commented Apr 15, 2016

This corner case (drawing 1 node) breaks spring layout and shouldn't

import networkx as nx  
G=nx.Graph()  
G.add_node("spam")  
nx.draw_networkx(G, node_size = 2000, node_color = "white", pos=nx.spring_layout(G))

http://stackoverflow.com/questions/36612991/how-to-draw-graph-having-single-node-in-networkx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant