Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
graph-tool
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
40
Issues
40
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tiago Peixoto
graph-tool
Commits
3f1e0fd9
Commit
3f1e0fd9
authored
May 08, 2012
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small documentation fixes.
parent
7f6d3aee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/graph_tool/generation/__init__.py
src/graph_tool/generation/__init__.py
+6
-6
No files found.
src/graph_tool/generation/__init__.py
View file @
3f1e0fd9
...
...
@@ -307,7 +307,7 @@ def random_graph(N, deg_sampler, deg_corr=None, cache_probs=True, directed=True,
The blockmodel can be generated as follows.
>>> g, bm = gt.random_graph(
1
000, lambda: poisson(10), directed=False,
>>> g, bm = gt.random_graph(
5
000, lambda: poisson(10), directed=False,
... blockmodel=lambda: randint(10), deg_corr=corr,
... mix_time=500)
>>> gt.graph_draw(g, vertex_fill_color=bm, output="blockmodel.pdf")
...
...
@@ -978,15 +978,15 @@ def lattice(shape, periodic=False):
Examples
--------
>>> g = gt.lattice([10,10])
>>> gt.graph_draw(g, pos=gt.sfdp_layout(g, cooling_step=0.9
9, epsilon=1e-3
),
>>> gt.graph_draw(g, pos=gt.sfdp_layout(g, cooling_step=0.9
5, epsilon=1e-2
),
... output_size=(300,300), output="lattice.pdf")
<...>
>>> g = gt.lattice([10,20], periodic=True)
>>> gt.graph_draw(g, pos=gt.sfdp_layout(g, cooling_step=0.9
9, epsilon=1e-3
, multilevel=True),
>>> gt.graph_draw(g, pos=gt.sfdp_layout(g, cooling_step=0.9
5, epsilon=1e-2
, multilevel=True),
... output_size=(300,300), output="lattice_periodic.pdf")
<...>
>>> g = gt.lattice([10,10,10])
>>> gt.graph_draw(g, pos=gt.sfdp_layout(g, cooling_step=0.9
9, epsilon=1e-3
, multilevel=True),
>>> gt.graph_draw(g, pos=gt.sfdp_layout(g, cooling_step=0.9
5, epsilon=1e-2
, multilevel=True),
... output_size=(300,300), output="lattice_3d.pdf")
<...>
...
...
@@ -1166,12 +1166,12 @@ def price_network(N, m=1, c=None, gamma=1, directed=True, seed_graph=None):
Examples
--------
>>> g = gt.price_network(100000)
>>> gt.graph_draw(g, pos=gt.sfdp_layout(g, epsilon=1e-
3, cooling_step=0.99
),
>>> gt.graph_draw(g, pos=gt.sfdp_layout(g, epsilon=1e-
2, cooling_step=0.95
),
... vertex_fill_color=g.vertex_index, vertex_size=2,
... edge_pen_width=1, output="price-network.png")
<...>
>>> g = gt.price_network(100000, c=0.1)
>>> gt.graph_draw(g, pos=gt.sfdp_layout(g, epsilon=1e-
3, cooling_step=0.99
),
>>> gt.graph_draw(g, pos=gt.sfdp_layout(g, epsilon=1e-
2, cooling_step=0.95
),
... 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