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
014d0529
Commit
014d0529
authored
Aug 02, 2009
by
Tiago Peixoto
Browse files
Small modifications in the quick start guide
parent
7e6968aa
Changes
2
Show whitespace changes
Inline
Side-by-side
doc/price.py
View file @
014d0529
...
...
@@ -57,9 +57,10 @@ for i in xrange(1, N):
in_hist
=
vertex_hist
(
g
,
"in"
)
clf
()
errorbar
(
in_hist
[
1
],
in_hist
[
0
],
fmt
=
"
.
"
,
yerr
=
sqrt
(
in_hist
[
0
]))
errorbar
(
in_hist
[
1
],
in_hist
[
0
],
fmt
=
"
o
"
,
yerr
=
sqrt
(
in_hist
[
0
])
,
label
=
"in"
)
gca
().
set_yscale
(
"log"
)
gca
().
set_xscale
(
"log"
)
legend
(
loc
=
"best"
)
xlabel
(
"$k_{in}$"
)
ylabel
(
"$P(k_{in})$"
)
savefig
(
"deg-hist.png"
)
...
...
doc/quickstart.rst
View file @
014d0529
...
...
@@ -334,5 +334,21 @@ An Example: Building a Price Network
Nowhere else to go... We found the main hub!
.. image:: deg-hist.png
.. figure:: deg-hist.png
:align: center
In-degree distribution of a price network with 100000 nodes.
We can draw the graph to see some other features of its topology. For that we
use the :func:`~graph_tool.draw.graph_draw` function.
.. testcode::
g = load_graph("price.xml.gz")
g.remove_vertex_if(lambda v: g.vertex_index[v] >= 1000)
gt.graph_draw(g, output="price.png")
.. figure:: price.png
:align: center
First 1000 nodes of a price network.
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