Commit 631a574c authored by Tiago Peixoto's avatar Tiago Peixoto

Fix example in graph_draw() docstring

parent dc9d0a46
......@@ -232,11 +232,7 @@ def graph_draw(g, pos=None, size=(15, 15), pin=False, layout=None, maxiter=None,
>>> g = gt.random_graph(1000, lambda: min(zipf(2.4), 40),
... lambda i,j: exp(abs(i-j)), directed=False)
>>> # extract largest component
>>> comp = gt.label_components(g)
>>> h = gt.vertex_hist(g, comp)
>>> max_comp = h[1][list(h[0]).index(max(h[0]))]
>>> g.remove_vertex_if(lambda v: comp[v] != max_comp)
>>>
>>> g = GraphView(g, vfilt=gt.label_largest_component(g))
>>> deg = g.degree_property_map("out")
>>> deg.get_array()[:] = 2*(sqrt(deg.get_array()[:])*0.5 + 0.4)
>>> ebet = gt.betweenness(g)[1]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment