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
a7c6527b
Commit
a7c6527b
authored
Jan 15, 2014
by
Tiago Peixoto
Browse files
Cosmetic docstring example improvements
parent
28610ba6
Changes
2
Hide whitespace changes
Inline
Side-by-side
doc/quickstart.rst
View file @
a7c6527b
...
...
@@ -521,7 +521,8 @@ use the :func:`~graph_tool.draw.graph_draw` function.
g = load_graph("price.xml.gz")
age = g.vertex_properties["age"]
graph_draw(g, output_size=(1000, 1000), vertex_color=age,
pos = sfdp_layout(g, cooling_step=0.99)
graph_draw(g, pos, output_size=(1000, 1000), vertex_color=age,
vertex_fill_color=age, vertex_size=1, edge_pen_width=1.2,
output="price.png")
...
...
src/graph_tool/generation/__init__.py
View file @
a7c6527b
...
...
@@ -1529,12 +1529,12 @@ def price_network(N, m=1, c=None, gamma=1, directed=True, seed_graph=None):
gt.seed_rng(42)
>>> g = gt.price_network(20000)
>>> gt.graph_draw(g, pos=gt.sfdp_layout(g,
epsilon=1e-2,
cooling_step=0.9
5
),
>>> gt.graph_draw(g, pos=gt.sfdp_layout(g, cooling_step=0.9
9
),
... vertex_fill_color=g.vertex_index, vertex_size=2,
... edge_pen_width=1, output="price-network.png")
<...>
>>> g = gt.price_network(20000, c=0.1)
>>> gt.graph_draw(g, pos=gt.sfdp_layout(g,
epsilon=1e-2,
cooling_step=0.9
5
),
>>> gt.graph_draw(g, pos=gt.sfdp_layout(g, cooling_step=0.9
9
),
... vertex_fill_color=g.vertex_index, vertex_size=2,
... edge_pen_width=1, output="price-network-broader.png")
<...>
...
...
Write
Preview
Markdown
is supported
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