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

Feature Request: Apply this to networkx pos layout argument #84

Open
jolespin opened this issue Jun 21, 2019 · 4 comments
Open

Feature Request: Apply this to networkx pos layout argument #84

jolespin opened this issue Jun 21, 2019 · 4 comments

Comments

@jolespin
Copy link
Contributor

This is totally off topic but I feel like your algorithm would be perfect for fixing networkx plots. Would be possible to adapt your code to take in a dictionary like this: {'node_A':[x,y], 'node_B':[x,y], ..., 'node_Z':[x,y]} w/ labels and then output a new node dictionary so when you plot the labels there's no overlap :)

This could be EXTREMELY useful and your code pretty much already solves the problem...

@Phlya
Copy link
Owner

Phlya commented Jun 22, 2019

Interesting. I have never used networkx, so not sure I fully understand what you are suggesting - could you show an example?

A problem is that, it seems, you want to provide strings which will be plotted by adjust_text, but it needs to have Text objects to start with - and while it could create them, not sure this is the right approach, since then it would have to expose all the options for text formatting, and that's a lot of stuff...

@jolespin
Copy link
Contributor Author

jolespin commented Jun 22, 2019 via email

@Phlya
Copy link
Owner

Phlya commented Jun 23, 2019

Would you say outputting final coordinates of the text objects would be sufficient to add the graph to the plot after adjusting text positions? This way you could create text objects according to original graph coordinates, adjust them, then change the graph to plot it so it fits the label coordinates? As I said, I am wary of implementing the original proposed idea, but happy to help to create a way to make it work.

@jolespin
Copy link
Contributor Author

jolespin commented Jun 23, 2019 via email

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

No branches or pull requests

2 participants