Dear graph-tool owner and subscribers,
I would like to draw the largest component of a directed graph g, where the
vertex size = the out degree.
Here's my code:
g = load_graph(inFile)
g=GraphView(g,vfilt=label_largest_component(g, directed=False))
g.purge_vertices()
deg =g.degree_property_map("out")
deg.a = (sqrt(deg.a) * 0.5 + 0.4)+1
graph_draw(g, vertex_size=deg,output="test1.pdf")
But I keep getting the following error whenever I try to draw it:
Traceback (most recent call last):
File "/Users/enigmaFish/PycharmProjects/project/paint.py", line 49, in
<module>
graph_draw(g, vertex_size=deg,output="test1.pdf")
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/graph_tool/draw/cairo_draw.py",
line 1138, in graph_draw
pad, cr)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/graph_tool/draw/cairo_draw.py",
line 1312, in fit_to_view
font_size, cr)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/graph_tool/draw/cairo_draw.py",
line 1285, in get_bb
x_delta = [x_range[0] - (pos_x.fa - delta).min(),
ValueError: operands could not be broadcast together with shapes (47579,)
(10438,)
Note that g is <Graph object, directed, with 47579 vertices and 38781 edges
at 0x1292a15d0>
Upon filtering, it becomes <GraphView object, directed, with 10438 vertices
and 12388 edges, edges filtered by (<PropertyMap object with key type
'Edge' and value type 'bool', for Graph 0x1292bcd10, at 0x1292cf5d0>,
False), vertices filtered by (<PropertyMap object with key type 'Vertex'
and value type 'bool', for Graph 0x1292bcd10, at 0x1292cf110>, False) at
0x1292bcd10>
Thank you very much for your help!

Hi,
I'm looking for info on the testing package used to test graph-tool,
specifclly in case I want to know what test cases were used to test a
specific alghorithm li - whee can I find it i.e. : "graph_tool.topology.
kcore_decomposition(*g*, *deg='out'*, *vprop=None*)"
thanks,
Nadav
<https://graph-tool.skewed.de/static/doc/topology.html#graph_tool.topology.k…>

Hi
given a graph G I want to compute a corresponding reachability graph; that
is, for a given distance r, if the distance between two vertices is less
than r they are joined by an edge.
The shortest_distance function with the Johnson algorithm works fine but
returns the distances between all pairs of vertices's and not just those
with a distance less than r. Iterating through all distances and finding
those with distance less than r is one solution but this is incredibly slow
due to the size of my graph.
Have you any suggestions? I’m considering using the breath first search
functionality but I don’t think there is an option to terminate the search
on parts the search tree with distance greater than r.
thanks in advance
--
View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com…
Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.

Dear graph-tool owner and subscriber,
I would like to draw the largest component of a directed graph g, where the
vertex size = the out degree.
Here's my code:
g = load_graph(inFile)
g=GraphView(g,vfilt=label_largest_component(g, directed=False))
g.purge_vertices()
deg =g.degree_property_map("out")
deg.a = (sqrt(deg.a) * 0.5 + 0.4)+1
graph_draw(g, vertex_size=deg,output="test1.pdf")
But I keep getting the following error whenever I try to draw it:
Traceback (most recent call last):
File "/Users/enigmaFish/PycharmProjects/project/paint.py", line 49, in
<module>
graph_draw(g, vertex_size=deg,output="test1.pdf")
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/graph_tool/draw/cairo_draw.py",
line 1138, in graph_draw
pad, cr)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/graph_tool/draw/cairo_draw.py",
line 1312, in fit_to_view
font_size, cr)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/graph_tool/draw/cairo_draw.py",
line 1285, in get_bb
x_delta = [x_range[0] - (pos_x.fa - delta).min(),
ValueError: operands could not be broadcast together with shapes (47579,)
(10438,)
Note that g is <Graph object, directed, with 47579 vertices and 38781 edges
at 0x1292a15d0>
Upon filtering, it becomes <GraphView object, directed, with 10438 vertices
and 12388 edges, edges filtered by (<PropertyMap object with key type
'Edge' and value type 'bool', for Graph 0x1292bcd10, at 0x1292cf5d0>,
False), vertices filtered by (<PropertyMap object with key type 'Vertex' and
value type 'bool', for Graph 0x1292bcd10, at 0x1292cf110>, False) at
0x1292bcd10>
Thank you very much for your help!
--
View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com…
Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.

Good time to you, dear graph-tool author.
Im trying to make graph layout for different planning algorithms on
python3. I made this normally, but I need to create a pop-up window,
that will blow up after click on vertex, with text from propety of
vertex. I didnt find any material for this in WEB, can you give me some
advises about that?