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

Generate pdf images in the documentation by default

Images are now converted to png a posteriori for html output, but are
used as pdf for latex.
parent 44917c1c
...@@ -22,5 +22,8 @@ ...@@ -22,5 +22,8 @@
{% block sidebarsearch %} {% block sidebarsearch %}
{{ super() }} {{ super() }}
<a href="graph-tool.pdf">(Download PDF version)</a> <a href="graph-tool.pdf">(Download PDF version)</a>
<p/>
Latest <a href="/graph-tool/doc/dev/">development version docs</a> are also available.
{% endblock %} {% endblock %}
all: PDFIMAGES = $(shell ls *.pdf)
PNGIMAGES = ${PDFIMAGES:.pdf=.png}
HUGEIMAGES = $(shell find . -name "*.pdf" -size +1000k)
ORIGIMAGES = ${HUGEIMAGES:.pdf=.pdf-orig}
PNGCONV = gm convert -density 600 -resample 50 -trim -antialias -quality 9 -filter Cubic
all: $(ORIGIMAGES) $(PNGIMAGES)
sphinx-build -E -b html . build sphinx-build -E -b html . build
%.pdf-orig: %.pdf
cp $< $@
gm mogrify -resize 600 -trim -antialias -filter Cubic $<
%.png: %.pdf
test -d $<-orig && $(PNGCONV) $<-orig $@ || true
test -d $<-orig || $(PNGCONV) $< $@ || true
latex: latex:
sphinx-build -E -b latex . build sphinx-build -E -b latex . build
...@@ -9,3 +24,7 @@ test: ...@@ -9,3 +24,7 @@ test:
push: push:
rsync -rEvpLz build/* root@skewed.de:/var/www/graph-tool-doc/ rsync -rEvpLz build/* root@skewed.de:/var/www/graph-tool-doc/
push-dev:
rsync -rEvpLz build/* root@skewed.de:/var/www/graph-tool-doc/dev/
...@@ -215,12 +215,19 @@ latex_documents = [ ...@@ -215,12 +215,19 @@ latex_documents = [
ur'Tiago de Paula Peixoto', 'manual'), ur'Tiago de Paula Peixoto', 'manual'),
] ]
#latex_logo = "graph-draw.png" latex_preamble = """
\setcounter{tocdepth}{2}
"""
latex_show_pagerefs = True
latex_show_urls = False
latex_paper_size = "a4"
latex_logo = "blockmodel.pdf"
latex_elements = { latex_elements = {
'papersize': "a4paper", 'papersize': "a4paper",
'fontpkg': r"\usepackage{palatino}\usepackage{eulervm}"} 'fontpkg': r"\usepackage{bookman}"}
# Example configuration for intersphinx: refer to the Python standard library. # Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'python': ('http://docs.python.org', None), intersphinx_mapping = {'python': ('http://docs.python.org', None),
......
...@@ -66,7 +66,7 @@ gca().set_xlim(0.8, 1e3) ...@@ -66,7 +66,7 @@ gca().set_xlim(0.8, 1e3)
subplots_adjust(left=0.2, bottom=0.2) subplots_adjust(left=0.2, bottom=0.2)
xlabel("$k_{in}$") xlabel("$k_{in}$")
ylabel("$NP(k_{in})$") ylabel("$NP(k_{in})$")
savefig("deg-hist.png") savefig("deg-hist.pdf")
# let's do a random walk on the graph and print the age of the vertices we find, # let's do a random walk on the graph and print the age of the vertices we find,
# just for fun. # just for fun.
......
...@@ -83,10 +83,10 @@ visualize the graph we created so far with the ...@@ -83,10 +83,10 @@ visualize the graph we created so far with the
.. doctest:: .. doctest::
>>> graph_draw(g, vprops={"label": g.vertex_index}, output="two-nodes.png") >>> graph_draw(g, vprops={"label": g.vertex_index}, output="two-nodes.pdf")
<...> <...>
.. figure:: two-nodes.png .. figure:: two-nodes.*
:align: center :align: center
A simple directed graph with two vertices and one edge, created by A simple directed graph with two vertices and one edge, created by
...@@ -451,7 +451,7 @@ This is the degree distribution, with 100000 nodes. If you want to see a broader ...@@ -451,7 +451,7 @@ This is the degree distribution, with 100000 nodes. If you want to see a broader
power law, try to increase the number of vertices to something like :math:`10^6` power law, try to increase the number of vertices to something like :math:`10^6`
or :math:`10^7`. or :math:`10^7`.
.. figure:: deg-hist.png .. figure:: deg-hist.*
:align: center :align: center
In-degree distribution of a price network with 100000 nodes. In-degree distribution of a price network with 100000 nodes.
...@@ -463,9 +463,9 @@ use the :func:`~graph_tool.draw.graph_draw` function. ...@@ -463,9 +463,9 @@ use the :func:`~graph_tool.draw.graph_draw` function.
g = load_graph("price.xml.gz") g = load_graph("price.xml.gz")
age = g.vertex_properties["age"] age = g.vertex_properties["age"]
graph_draw(g, size=(15,15), vcolor=age, output="price.png") graph_draw(g, size=(15,15), vcolor=age, output="price.pdf")
.. figure:: price.png .. figure:: price.*
:align: center :align: center
A Price network with :math:`10^5` nodes. The vertex colors represent A Price network with :math:`10^5` nodes. The vertex colors represent
...@@ -508,13 +508,13 @@ edge filtering. ...@@ -508,13 +508,13 @@ edge filtering.
g, pos = triangulation(random((500, 2)) * 4, type="delaunay") g, pos = triangulation(random((500, 2)) * 4, type="delaunay")
tree = min_spanning_tree(g) tree = min_spanning_tree(g)
graph_draw(g, pos=pos, pin=True, size=(8, 8), ecolor=tree, output="min_tree.png") graph_draw(g, pos=pos, pin=True, size=(8, 8), ecolor=tree, output="min_tree.pdf")
The ``tree`` property map has a bool type, with value "1" if the edge belongs to The ``tree`` property map has a bool type, with value "1" if the edge belongs to
the tree, and "0" otherwise. Below is an image of the original graph, with the the tree, and "0" otherwise. Below is an image of the original graph, with the
marked edges. marked edges.
.. figure:: min_tree.png .. figure:: min_tree.*
:align: center :align: center
We can now filter out the edges which don't belong to the minimum spanning tree. We can now filter out the edges which don't belong to the minimum spanning tree.
...@@ -522,11 +522,11 @@ We can now filter out the edges which don't belong to the minimum spanning tree. ...@@ -522,11 +522,11 @@ We can now filter out the edges which don't belong to the minimum spanning tree.
.. testcode:: .. testcode::
g.set_edge_filter(tree) g.set_edge_filter(tree)
graph_draw(g, pos=pos, pin=True, size=(8, 8), output="min_tree_filtered.png") graph_draw(g, pos=pos, pin=True, size=(8, 8), output="min_tree_filtered.pdf")
This is how the graph looks when filtered: This is how the graph looks when filtered:
.. figure:: min_tree_filtered.png .. figure:: min_tree_filtered.*
:align: center :align: center
Everything should work transparently on the filtered graph, simply as if the Everything should work transparently on the filtered graph, simply as if the
...@@ -539,9 +539,9 @@ and draws them as colors and line thickness in the graph. ...@@ -539,9 +539,9 @@ and draws them as colors and line thickness in the graph.
bv, be = betweenness(g) bv, be = betweenness(g)
be.a *= 10 be.a *= 10
graph_draw(g, pos=pos, pin=True, size=(8,8), vsize=0.07, vcolor=bv, graph_draw(g, pos=pos, pin=True, size=(8,8), vsize=0.07, vcolor=bv,
eprops={"penwidth":be}, output="filtered-bt.png") eprops={"penwidth":be}, output="filtered-bt.pdf")
.. figure:: filtered-bt.png .. figure:: filtered-bt.*
:align: center :align: center
...@@ -553,9 +553,9 @@ The original graph can be recovered by setting the edge filter to ``None``. ...@@ -553,9 +553,9 @@ The original graph can be recovered by setting the edge filter to ``None``.
bv, be = betweenness(g) bv, be = betweenness(g)
be.a *= 10 be.a *= 10
graph_draw(g, pos=pos, pin=True, size=(8,8), vsize=0.07, vcolor=bv, graph_draw(g, pos=pos, pin=True, size=(8,8), vsize=0.07, vcolor=bv,
eprops={"penwidth":be}, output="nonfiltered-bt.png") eprops={"penwidth":be}, output="nonfiltered-bt.pdf")
.. figure:: nonfiltered-bt.png .. figure:: nonfiltered-bt.*
:align: center :align: center
Everything works in analogous fashion with vertex filtering. Everything works in analogous fashion with vertex filtering.
...@@ -609,11 +609,11 @@ Like above, the result should be the isolated minimum spanning tree: ...@@ -609,11 +609,11 @@ Like above, the result should be the isolated minimum spanning tree:
>>> bv, be = betweenness(tv) >>> bv, be = betweenness(tv)
>>> be.a *= 10 >>> be.a *= 10
>>> graph_draw(tv, pos=pos, pin=True, size=(8,8), vsize=0.07, vcolor=bv, >>> graph_draw(tv, pos=pos, pin=True, size=(8,8), vsize=0.07, vcolor=bv,
... eprops={"penwidth":be}, output="mst-view.png") ... eprops={"penwidth":be}, output="mst-view.pdf")
<...> <...>
.. figure:: mst-view.png .. figure:: mst-view.*
:align: center :align: center
A view of the Delaunay graph, isolating only the minimum spanning tree. A view of the Delaunay graph, isolating only the minimum spanning tree.
...@@ -654,10 +654,10 @@ The graph view constructed above can be visualized as ...@@ -654,10 +654,10 @@ The graph view constructed above can be visualized as
.. doctest:: .. doctest::
>>> graph_draw(u, pos=pos, pin=True, size=(8,8), vsize=0.07, vcolor=bv, >>> graph_draw(u, pos=pos, pin=True, size=(8,8), vsize=0.07, vcolor=bv,
... output="central-edges-view.png") ... output="central-edges-view.pdf")
<...> <...>
.. figure:: central-edges-view.png .. figure:: central-edges-view.*
:align: center :align: center
A view of the Delaunay graph, isolating only the edges with A view of the Delaunay graph, isolating only the edges with
...@@ -682,10 +682,10 @@ The resulting graph view can be visualized as ...@@ -682,10 +682,10 @@ The resulting graph view can be visualized as
.. doctest:: .. doctest::
>>> graph_draw(u, pos=pos, pin=True, size=(8,8), vsize=0.07, >>> graph_draw(u, pos=pos, pin=True, size=(8,8), vsize=0.07,
... output="composed-filter.png") ... output="composed-filter.pdf")
<...> <...>
.. figure:: composed-filter.png .. figure:: composed-filter.*
:align: center :align: center
A composed view, obtained as the minimum spanning tree of all vertices A composed view, obtained as the minimum spanning tree of all vertices
......
...@@ -149,13 +149,13 @@ def community_structure(g, n_iter, n_spins, gamma=1.0, corr="erdos", ...@@ -149,13 +149,13 @@ def community_structure(g, n_iter, n_spins, gamma=1.0, corr="erdos",
>>> spins = gt.community_structure(g, 10000, 20, t_range=(5, 0.1), >>> spins = gt.community_structure(g, 10000, 20, t_range=(5, 0.1),
... history_file="community-history1") ... history_file="community-history1")
>>> gt.graph_draw(g, pos=pos, pin=True, vsize=0.3, vcolor=spins, >>> gt.graph_draw(g, pos=pos, pin=True, vsize=0.3, vcolor=spins,
... output="comm1.png", size=(10,10)) ... output="comm1.pdf", size=(10,10))
<...> <...>
>>> spins = gt.community_structure(g, 10000, 40, t_range=(5, 0.1), >>> spins = gt.community_structure(g, 10000, 40, t_range=(5, 0.1),
... gamma=2.5, ... gamma=2.5,
... history_file="community-history2") ... history_file="community-history2")
>>> gt.graph_draw(g, pos=pos, pin=True, vsize=0.3, vcolor=spins, >>> gt.graph_draw(g, pos=pos, pin=True, vsize=0.3, vcolor=spins,
... output="comm2.png", size=(10,10)) ... output="comm2.pdf", size=(10,10))
<...> <...>
>>> clf() >>> clf()
>>> xlabel("iterations") >>> xlabel("iterations")
...@@ -165,7 +165,7 @@ def community_structure(g, n_iter, n_spins, gamma=1.0, corr="erdos", ...@@ -165,7 +165,7 @@ def community_structure(g, n_iter, n_spins, gamma=1.0, corr="erdos",
>>> a = loadtxt("community-history1").transpose() >>> a = loadtxt("community-history1").transpose()
>>> plot(a[0], a[2]) >>> plot(a[0], a[2])
[...] [...]
>>> savefig("comm1-hist.png") >>> savefig("comm1-hist.pdf")
>>> clf() >>> clf()
>>> xlabel("iterations") >>> xlabel("iterations")
<...> <...>
...@@ -174,18 +174,18 @@ def community_structure(g, n_iter, n_spins, gamma=1.0, corr="erdos", ...@@ -174,18 +174,18 @@ def community_structure(g, n_iter, n_spins, gamma=1.0, corr="erdos",
>>> a = loadtxt("community-history2").transpose() >>> a = loadtxt("community-history2").transpose()
>>> plot(a[0], a[2]) >>> plot(a[0], a[2])
[...] [...]
>>> savefig("comm2-hist.png") >>> savefig("comm2-hist.pdf")
The community structure with :math:`\gamma=1`: The community structure with :math:`\gamma=1`:
.. image:: comm1.png .. image:: comm1.*
.. image:: comm1-hist.png .. image:: comm1-hist.*
The community structure with :math:`\gamma=2.5`: The community structure with :math:`\gamma=2.5`:
.. image:: comm2.png .. image:: comm2.*
.. image:: comm2-hist.png .. image:: comm2-hist.*
References References
...@@ -328,10 +328,10 @@ def condensation_graph(g, prop, weight=None): ...@@ -328,10 +328,10 @@ def condensation_graph(g, prop, weight=None):
>>> size.a = log(ng[1].a+1) >>> size.a = log(ng[1].a+1)
>>> gt.graph_draw(ng[0], vsize=size, vcolor=size, splines=True, >>> gt.graph_draw(ng[0], vsize=size, vcolor=size, splines=True,
... eprops={"len":20, "penwidth":10}, vprops={"penwidth":10}, ... eprops={"len":20, "penwidth":10}, vprops={"penwidth":10},
... output="comm-network.png", size=(10,10)) ... output="comm-network.pdf", size=(10,10))
<...> <...>
.. figure:: comm-network.png .. figure:: comm-network.*
:align: center :align: center
Community network of a random graph. The color and sizes of the nodes Community network of a random graph. The color and sizes of the nodes
......
...@@ -277,9 +277,9 @@ def corr_hist(g, deg_source, deg_target, bins=[[0, 1], [0, 1]], weight=None, ...@@ -277,9 +277,9 @@ def corr_hist(g, deg_source, deg_target, bins=[[0, 1], [0, 1]], weight=None,
<...> <...>
>>> colorbar() >>> colorbar()
<...> <...>
>>> savefig("corr.png") >>> savefig("corr.pdf")
.. figure:: corr.png .. figure:: corr.*
:align: center :align: center
Out/out-degree correlation histogram. Out/out-degree correlation histogram.
...@@ -363,9 +363,9 @@ def combined_corr_hist(g, deg1, deg2, bins=[[0, 1], [0, 1]], float_count=True): ...@@ -363,9 +363,9 @@ def combined_corr_hist(g, deg1, deg2, bins=[[0, 1], [0, 1]], float_count=True):
<...> <...>
>>> colorbar() >>> colorbar()
<...> <...>
>>> savefig("combined_corr.png") >>> savefig("combined_corr.pdf")
.. figure:: combined_corr.png .. figure:: combined_corr.*
:align: center :align: center
Combined in/out-degree correlation histogram. Combined in/out-degree correlation histogram.
...@@ -453,9 +453,9 @@ def avg_neighbour_corr(g, deg_source, deg_target, bins=[0, 1], weight=None): ...@@ -453,9 +453,9 @@ def avg_neighbour_corr(g, deg_source, deg_target, bins=[0, 1], weight=None):
<...> <...>
>>> errorbar(h[2][:-1], h[0], yerr=h[1], fmt="o") >>> errorbar(h[2][:-1], h[0], yerr=h[1], fmt="o")
(...) (...)
>>> savefig("avg_corr.png") >>> savefig("avg_corr.pdf")
.. figure:: avg_corr.png .. figure:: avg_corr.*
:align: center :align: center
Average out/out degree correlation. Average out/out degree correlation.
...@@ -530,9 +530,9 @@ def avg_combined_corr(g, deg1, deg2, bins=[0, 1]): ...@@ -530,9 +530,9 @@ def avg_combined_corr(g, deg1, deg2, bins=[0, 1]):
<...> <...>
>>> errorbar(h[2][:-1], h[0], yerr=h[1], fmt="o") >>> errorbar(h[2][:-1], h[0], yerr=h[1], fmt="o")
(...) (...)
>>> savefig("combined_avg_corr.png") >>> savefig("combined_avg_corr.pdf")
.. figure:: combined_avg_corr.png .. figure:: combined_avg_corr.*
:align: center :align: center
Average combined in/out-degree correlation. Average combined in/out-degree correlation.
......
...@@ -283,10 +283,10 @@ def graph_draw(g, pos=None, size=(15, 15), pin=False, layout=None, maxiter=None, ...@@ -283,10 +283,10 @@ def graph_draw(g, pos=None, size=(15, 15), pin=False, layout=None, maxiter=None,
>>> ebet.a += 10 >>> ebet.a += 10
>>> gt.graph_draw(g, vsize=deg, vcolor=deg, vorder=deg, elen=10, >>> gt.graph_draw(g, vsize=deg, vcolor=deg, vorder=deg, elen=10,
... ecolor=ebet, eorder=ebet, penwidth=ebet, ... ecolor=ebet, eorder=ebet, penwidth=ebet,
... overlap="prism", output="graph-draw.png") ... overlap="prism", output="graph-draw.pdf")
<...> <...>
.. figure:: graph-draw.png .. figure:: graph-draw.*
:align: center :align: center
Kamada-Kawai force-directed layout of a graph with a power-law degree Kamada-Kawai force-directed layout of a graph with a power-law degree
...@@ -686,10 +686,10 @@ def fruchterman_reingold_layout(g, weight=None, a=None, r=1., scale=None, ...@@ -686,10 +686,10 @@ def fruchterman_reingold_layout(g, weight=None, a=None, r=1., scale=None,
>>> seed(42) >>> seed(42)
>>> g = gt.price_network(300) >>> g = gt.price_network(300)
>>> pos = gt.fruchterman_reingold_layout(g, n_iter=1000) >>> pos = gt.fruchterman_reingold_layout(g, n_iter=1000)
>>> gt.graph_draw(g, pos=pos, pin=True, output="graph-draw-fr.png") >>> gt.graph_draw(g, pos=pos, pin=True, output="graph-draw-fr.pdf")
<...> <...>
.. figure:: graph-draw-fr.png .. figure:: graph-draw-fr.*
:align: center :align: center
Fruchterman-Reingold layout of a Price network. Fruchterman-Reingold layout of a Price network.
...@@ -767,10 +767,10 @@ def arf_layout(g, weight=None, d=0.5, a=10, dt=0.001, epsilon=1e-6, ...@@ -767,10 +767,10 @@ def arf_layout(g, weight=None, d=0.5, a=10, dt=0.001, epsilon=1e-6,
>>> seed(42) >>> seed(42)
>>> g = gt.price_network(300) >>> g = gt.price_network(300)
>>> pos = gt.arf_layout(g, max_iter=0) >>> pos = gt.arf_layout(g, max_iter=0)
>>> gt.graph_draw(g, pos=pos, pin=True, output="graph-draw-arf.png") >>> gt.graph_draw(g, pos=pos, pin=True, output="graph-draw-arf.pdf")
<...> <...>
.. figure:: graph-draw-arf.png .. figure:: graph-draw-arf.*
:align: center :align: center
ARF layout of a Price network. ARF layout of a Price network.
......
...@@ -59,10 +59,10 @@ The following network will be used as an example throughout the documentation. ...@@ -59,10 +59,10 @@ The following network will be used as an example throughout the documentation.
g.edge_properties["cap"] = cap g.edge_properties["cap"] = cap
g.vertex_properties["pos"] = pos g.vertex_properties["pos"] = pos
g.save("flow-example.xml.gz") g.save("flow-example.xml.gz")
gt.graph_draw(g, pos=pos, pin=True, penwidth=cap, output="flow-example.png") gt.graph_draw(g, pos=pos, pin=True, penwidth=cap, output="flow-example.pdf")
.. figure:: flow-example.png .. figure:: flow-example.*
:align: center :align: center
Example network used in the documentation below. The edge capacities are Example network used in the documentation below. The edge capacities are
...@@ -129,10 +129,10 @@ def edmonds_karp_max_flow(g, source, target, capacity, residual=None): ...@@ -129,10 +129,10 @@ def edmonds_karp_max_flow(g, source, target, capacity, residual=None):
>>> print max_flow >>> print max_flow
6.92759897841 6.92759897841
>>> pos = g.vertex_properties["pos"] >>> pos = g.vertex_properties["pos"]
>>> gt.graph_draw(g, pos=pos, pin=True, penwidth=res, output="example-edmonds-karp.png") >>> gt.graph_draw(g, pos=pos, pin=True, penwidth=res, output="example-edmonds-karp.pdf")
<...> <...>
.. figure:: example-edmonds-karp.png .. figure:: example-edmonds-karp.*
:align: center :align: center
Edge flows obtained with the Edmonds-Karp algorithm. The source and Edge flows obtained with the Edmonds-Karp algorithm. The source and
...@@ -205,10 +205,10 @@ def push_relabel_max_flow(g, source, target, capacity, residual=None): ...@@ -205,10 +205,10 @@ def push_relabel_max_flow(g, source, target, capacity, residual=None):
>>> print max_flow >>> print max_flow
6.92759897841 6.92759897841
>>> pos = g.vertex_properties["pos"] >>> pos = g.vertex_properties["pos"]
>>> gt.graph_draw(g, pos=pos, pin=True, penwidth=res, output="example-push-relabel.png") >>> gt.graph_draw(g, pos=pos, pin=True, penwidth=res, output="example-push-relabel.pdf")
<...> <...>
.. figure:: example-push-relabel.png .. figure:: example-push-relabel.*
:align: center :align: center
...@@ -282,10 +282,10 @@ def boykov_kolmogorov_max_flow(g, source, target, capacity, residual=None): ...@@ -282,10 +282,10 @@ def boykov_kolmogorov_max_flow(g, source, target, capacity, residual=None):
>>> print max_flow >>> print max_flow
6.92759897841 6.92759897841
>>> pos = g.vertex_properties["pos"] >>> pos = g.vertex_properties["pos"]
>>> gt.graph_draw(g, pos=pos, pin=True, penwidth=res, output="example-kolmogorov.png") >>> gt.graph_draw(g, pos=pos, pin=True, penwidth=res, output="example-kolmogorov.pdf")
<...> <...>
.. figure:: example-kolmogorov.png .. figure:: example-kolmogorov.*
:align: center :align: center
Edge flows obtained with the Boykov-Kolmogorov algorithm. The source and Edge flows obtained with the Boykov-Kolmogorov algorithm. The source and
...@@ -353,10 +353,10 @@ def max_cardinality_matching(g, match=None): ...@@ -353,10 +353,10 @@ def max_cardinality_matching(g, match=None):
>>> res = gt.max_cardinality_matching(g) >>> res = gt.max_cardinality_matching(g)
>>> print res[1] >>> print res[1]
True True
>>> gt.graph_draw(g, ecolor=res[0], output="max_card_match.png") >>> gt.graph_draw(g, ecolor=res[0], output="max_card_match.pdf")
<...> <...>
.. figure:: max_card_match.png .. figure:: max_card_match.*
:align: center :align: center
Edges belonging to the matching are in red. Edges belonging to the matching are in red.
......
...@@ -134,7 +134,7 @@ def random_graph(N, deg_sampler, deg_corr=None, directed=True, ...@@ -134,7 +134,7 @@ def random_graph(N, deg_sampler, deg_corr=None, directed=True,
``mix_time`` parameter passed as ``n_iter``. ``mix_time`` parameter passed as ``n_iter``.
The complexity is :math:`O(V + E)` if parallel edges are allowed, and The complexity is :math:`O(V + E)` if parallel edges are allowed, and
:math:`O(V + E \times\text{mix_time})` if parallel edges are not allowed. :math:`O(V + E \times\text{mix-time})` if parallel edges are not allowed.
.. note :: .. note ::
...@@ -213,9 +213,9 @@ def random_graph(N, deg_sampler, deg_corr=None, directed=True, ...@@ -213,9 +213,9 @@ def random_graph(N, deg_sampler, deg_corr=None, directed=True,
<...> <...>
>>> ylabel("out-degree") >>> ylabel("out-degree")
<...> <...>
>>> savefig("combined-deg-hist.png") >>> savefig("combined-deg-hist.pdf")
.. figure:: combined-deg-hist.png .. figure:: combined-deg-hist.*
:align: center :align: center
Combined degree histogram. Combined degree histogram.
...@@ -266,9 +266,9 @@ def random_graph(N, deg_sampler, deg_corr=None, directed=True, ...@@ -266,9 +266,9 @@ def random_graph(N, deg_sampler, deg_corr=None, directed=True,
<...> <...>
>>> ylabel("average target degree") >>> ylabel("average target degree")
<...> <...>
>>> savefig("deg-corr-dir.png") >>> savefig("deg-corr-dir.pdf")
.. figure:: deg-corr-dir.png .. figure:: deg-corr-dir.*