How can i set minimun distance between nodes (so they do not overlap each other)
I am using sfdp_layout. How can i modify it so nodes do not overlap each other alot and can show edges? Graph going to be huge (Millon of nodes) so what is best algorithm for it ? below is my result and code of 70k nodes (email conversation) : <https://lh3.googleusercontent.com/-mp9AYfKCLN8/U0WHfv93LiI/AAAAAAAAAvE/46g3j4OQHBc/s1600/test_p10.png>
def draw_graph(userdict,edges): g = Graph() g.add_vertex(len(userdict)) for edg in edges: g.add_edge(*edg)
#pos = sfdp_layout(g, C=0.8 , K=4, cooling_step=0.69) pos = sfdp_layout(g,p=10, cooling_step=0.69) for vertex in g.vertices(): print pos[vertex] return g
Thanks Phyo.
On 04/09/2014 07:47 PM, Phyo Arkar Lwin wrote:
I am using sfdp_layout.
How can i modify it so nodes do not overlap each other alot and can show edges?
You should change the node size and the edge width.
Graph going to be huge (Millon of nodes) so what is best algorithm for it ?
It probably does not matter. If your graph is so large and is not low-dimensional like a lattice or a tree, it it is too large it almost always will look like a huge blob with any algorithm. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
Hi all, I would like to determine the fractal dimension of the graph. I can assigned a "geometric distance" between each pair of vertices, therefore, I could also assign each edge a "length". One thing I could do is to somehow define a center and then count the the number of the nodes within "a circle" with increasing "radius". See how the number of the vertices scales with the increasing radius. I wonder Is there any other ways to calculate the fractal dimension using some features from any graph-tool functions? Can I estimate the fractal dimension from the adjacency matrix maybe? I would appreciate any advise. Thanks! Best, Hu
On 04/24/2014 12:32 AM, Xiaohu Hu wrote:
Hi all,
I would like to determine the fractal dimension of the graph. I can assigned a "geometric distance" between each pair of vertices, therefore, I could also assign each edge a "length". One thing I could do is to somehow define a center and then count the the number of the nodes within "a circle" with increasing "radius". See how the number of the vertices scales with the increasing radius.
I wonder Is there any other ways to calculate the fractal dimension using some features from any graph-tool functions? Can I estimate the fractal dimension from the adjacency matrix maybe? I would appreciate any advise.
There are no implementations of fractal dimension in graph-tool. Note that this is an active area of research, and there is no universally accepted definition of a generalized fractal dimension for graphs. I think the most famous method is: http://www.nature.com/nature/journal/v433/n7024/abs/nature03248.html But there are several issues with this approach. See e.g. the following paper for a well-founded criticism: http://journals.aps.org/pre/pdf/10.1103/PhysRevE.84.066111 Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
Thanks for the references, I really appreciate it! On Apr 24, 2014 6:22 AM, "Tiago de Paula Peixoto" <tiago@skewed.de> wrote:
On 04/24/2014 12:32 AM, Xiaohu Hu wrote:
Hi all,
I would like to determine the fractal dimension of the graph. I can assigned a "geometric distance" between each pair of vertices, therefore, I could also assign each edge a "length". One thing I could do is to somehow define a center and then count the the number of the nodes within "a circle" with increasing "radius". See how the number of the vertices scales with the increasing radius.
I wonder Is there any other ways to calculate the fractal dimension using some features from any graph-tool functions? Can I estimate the fractal dimension from the adjacency matrix maybe? I would appreciate any advise.
There are no implementations of fractal dimension in graph-tool.
Note that this is an active area of research, and there is no universally accepted definition of a generalized fractal dimension for graphs. I think the most famous method is:
http://www.nature.com/nature/journal/v433/n7024/abs/nature03248.html
But there are several issues with this approach. See e.g. the following paper for a well-founded criticism:
http://journals.aps.org/pre/pdf/10.1103/PhysRevE.84.066111
Best, Tiago
-- Tiago de Paula Peixoto <tiago@skewed.de>
_______________________________________________ graph-tool mailing list graph-tool@skewed.de http://lists.skewed.de/mailman/listinfo/graph-tool
Hi, I have got another question. So I have here a graph with N vertices and M edges. Given a subset of n vertices, I would like to count how many edges are there between these n vertices of the subset. Is there any existing graph-tool function that can be used for this task? Thanks! Hu On 4/24/2014 6:20 AM, Tiago de Paula Peixoto wrote:
On 04/24/2014 12:32 AM, Xiaohu Hu wrote:
Hi all,
I would like to determine the fractal dimension of the graph. I can assigned a "geometric distance" between each pair of vertices, therefore, I could also assign each edge a "length". One thing I could do is to somehow define a center and then count the the number of the nodes within "a circle" with increasing "radius". See how the number of the vertices scales with the increasing radius.
I wonder Is there any other ways to calculate the fractal dimension using some features from any graph-tool functions? Can I estimate the fractal dimension from the adjacency matrix maybe? I would appreciate any advise. There are no implementations of fractal dimension in graph-tool.
Note that this is an active area of research, and there is no universally accepted definition of a generalized fractal dimension for graphs. I think the most famous method is:
http://www.nature.com/nature/journal/v433/n7024/abs/nature03248.html
But there are several issues with this approach. See e.g. the following paper for a well-founded criticism:
http://journals.aps.org/pre/pdf/10.1103/PhysRevE.84.066111
Best, Tiago
_______________________________________________ graph-tool mailing list graph-tool@skewed.de http://lists.skewed.de/mailman/listinfo/graph-tool
On 04/25/2014 12:50 AM, Xiaohu Hu wrote:
Hi,
I have got another question.
So I have here a graph with N vertices and M edges. Given a subset of n vertices, I would like to count how many edges are there between these n vertices of the subset. Is there any existing graph-tool function that can be used for this task?
No, but you can just construct a filtered graph with a GraphView containing only those nodes, and just call num_edges() on that. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
Ah good idea, thanks! On Apr 25, 2014 2:51 AM, "Tiago de Paula Peixoto" <tiago@skewed.de> wrote:
On 04/25/2014 12:50 AM, Xiaohu Hu wrote:
Hi,
I have got another question.
So I have here a graph with N vertices and M edges. Given a subset of n vertices, I would like to count how many edges are there between these n vertices of the subset. Is there any existing graph-tool function that can be used for this task?
No, but you can just construct a filtered graph with a GraphView containing only those nodes, and just call num_edges() on that.
Best, Tiago
-- Tiago de Paula Peixoto <tiago@skewed.de>
_______________________________________________ graph-tool mailing list graph-tool@skewed.de http://lists.skewed.de/mailman/listinfo/graph-tool
Thanks alot Tiago I am hoping it would scale and there will be some gap if i increase resolution like 4000 x 4000 but it dosen't . On Friday, April 11, 2014 6:25:26 PM UTC+6:30, Tiago Peixoto wrote:
On 04/09/2014 07:47 PM, Phyo Arkar Lwin wrote:
I am using sfdp_layout.
How can i modify it so nodes do not overlap each other alot and can show edges?
You should change the node size and the edge width.
Graph going to be huge (Millon of nodes) so what is best algorithm for it ?
It probably does not matter. If your graph is so large and is not low-dimensional like a lattice or a tree, it it is too large it almost always will look like a huge blob with any algorithm.
Best, Tiago
-- Tiago de Paula Peixoto <ti...@skewed.de <javascript:>>
participants (3)
-
Phyo Arkar Lwin -
Tiago de Paula Peixoto -
Xiaohu Hu