Sparse graph layout on first run of application.
See original GitHub issueHi Chris - big thanks to you and your work it’s a very cool component you’ve built.
My minor issue is on the first run of my streamlit application the resultant graph produced has a sparse structure (i.e. nodes are all a great distance from one another) whereas future outputs solve this issue and the graph has the desired shape. The images below show what I’m referring to:
Sparse
Future runs - desired shape
This is on streamlit_agraph version 0.0.35. The configurations which produces are shown below for reference:
config = Config(width=3000,
height=1000,
directed=True,
nodeHighlightBehavior=True,
highlightColor="#F7A7A6", # or "blue"
collapsible=False,
staticGraph = False,
staticGraphWithDragAndDrop=False,
)
return_value = agraph(nodes=nodes,
edges=edges,
config=config)
Let me know if I can provide any additional information. Its obviously not a huge issue if rerunning the function that outputs the graph solves it but more curious as to why this might be the case. Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Sparse Graph Representation and Its Applications - Shuchu Han
In this thesis, we build novel sparse and nonparametric graph represen- tation algorithms for unsupervised learning. The theory foundation of our research works ......
Read more >Deciding First-Order Properties for Sparse Graphs - IEEE Xplore
We present a linear-time algorithm for deciding first-order logic (FOL) properties in classes of graphs with bounded expansion.
Read more >Running time for sparse graphs | Download Scientific Diagram
The second run is performed after such a reordering. In our first experiment, we consider sparse graphs with 1,000 to 30,000 nodes on...
Read more >A greedy algorithm to construct sparse graph by using ranked ...
Introduction · 1. We propose a greedy algorithm to reduce the computational time of generating \mathcal {L}_1 graph. · 2. We introduce the...
Read more >What are the applications of sparse graphs? - Quora
A sparse graph has relatively few edges when compared to the number of vertices. A dense graph has an edge count that is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looks awesome! Would be pleased to see you tweeting about it.
Could be some gravity related feat actually - it’s interesting because on that first run it appears almost as if it’s started to pull the nodes together then stops. Good point on the canvas size I’ll play around with that as I do have it set to quite a large area currently. Re the unnecessary parameters: I was experimenting to see if they might have had an effect but I’ll remove them if they’re not the cause.
Glad you like the graph haha, I think this one below is my favourite thus far:
It’s mapping headlines/queries used on Twitter’s API search with a focus on the links shared to external sites. The node hierarchy goes like:
Thanks for the reply too, I’ll let you know if I work out what was the cause.