Commit a7c6527b authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Cosmetic docstring example improvements

parent 28610ba6
......@@ -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")
......
......@@ -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.95),
>>> gt.graph_draw(g, pos=gt.sfdp_layout(g, cooling_step=0.99),
... 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.95),
>>> gt.graph_draw(g, pos=gt.sfdp_layout(g, cooling_step=0.99),
... vertex_fill_color=g.vertex_index, vertex_size=2,
... edge_pen_width=1, output="price-network-broader.png")
<...>
......
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