Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
631a574c
Commit
631a574c
authored
Apr 21, 2011
by
Tiago Peixoto
Browse files
Fix example in graph_draw() docstring
parent
dc9d0a46
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/draw/__init__.py
View file @
631a574c
...
...
@@ -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]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment