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

ASCII graph representation #1

Open
epurdy opened this issue Sep 3, 2012 · 0 comments
Open

ASCII graph representation #1

epurdy opened this issue Sep 3, 2012 · 0 comments

Comments

@epurdy
Copy link
Collaborator

epurdy commented Sep 3, 2012

It would be nice to actually show a crude drawing of the graph around the current node. It might also be nice to see a crude drawing of a clustering of the whole graph, since that would tell us some useful things about the overall structure.

We can get a neighborhood around the current node straightforwardly in networkx:

We could use graphviz to get a nice layout of the neighborhood, and then discretize that layout to the character grid. Graphviz seems to have a python wrapper which is in turn integrated with networkx:

Graphviz (I think?) wants to know, for pairs of nodes, how far apart those nodes want to be. So, we would need to come up with some heuristic for that. It looks like networkx will have something reasonable in its algorithms:

I'm not sure which algorithm would be best, but we should probably just play with different ones until we find one that feels right.

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

No branches or pull requests

1 participant