Commit 3d854565 authored by Tiago Peixoto's avatar Tiago Peixoto

Documentation improvements

parent b7d0ea46
......@@ -5,20 +5,6 @@
{% endblock %}
{% block extrahead %}
<script type="text/javascript">
var _gaq = _gaq || [];
var pluginUrl =
'//www.google-analytics.com/plugins/ga/inpage_linkid.js';
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);
_gaq.push(['_setAccount', 'UA-248813-2']);
_gaq.push(['_setDomainName', '.skewed.de']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
{{ super() }}
{% endblock %}
......
......@@ -197,11 +197,16 @@ import pyenv
plot_rcparams = pyenv.rcParams
#plot_pre_code = open("pyenv.py").read()
autodoc_default_flags = ['members', 'undoc-members']
autodoc_default_options = {
'members': True,
'member-order': 'bysource',
'undoc-members': True
}
autosummary_gerenerate = True
numpydoc_show_class_members = False
autodoc_docstring_signature = False
autodoc_member_order = 'bysource'
autoclass_content = 'both'
imported_members = True
......
......@@ -205,7 +205,7 @@ div.admonition {
padding: 0px 12px 12px 12px;
/* line-height: 24px; */
margin-bottom: 24px;
margin-top: 12px;
margin-top: 20px;
/* padding: 10px 30px; */
/* border-top: 1px solid #ccc; */
/* border-bottom: 1px solid #ccc; */
......@@ -220,12 +220,17 @@ div.admonition p.admonition-title {
line-height: 1;
display: block;
color: #FFF;
margin: -12px -12px 12px;
/* color: #FFF; */
margin: -12px -12px 8px;
padding: 6px 12px;
}
div.admonition p {
margin-bottom: 0;
margin-top: 0;
}
div.admonition p.last {
margin-bottom: 0;
}
......@@ -365,10 +370,39 @@ dl.function dt, dl.class dt, dl.exception dt{
background-color: #E7F2FA;
}
dd.field-even dt, dd.field-odd dt{
background-color: inherit;
}
dl.function dt.field-even, dl.function dt.field-odd,
dl.class dt.field-even, dl.class dt.field-odd,
dl.exception dt.field-even, dl.exception dt.field-odd {
background-color: inherit;
}
dl.docutils dt {
background-color: inherit;
}
dl.citation dt {
background-color: inherit;
}
ol.arabic li dl dt {
background-color: inherit;
}
.brackets:before {
content: "[";
}
.brackets:after {
content: "]";
}
.fn-backref {
margin-right: 10px;
}
pre {
background: #eee;
......
......@@ -13,7 +13,7 @@ font_size=14
rcParams["backend"] = "PDF"
rcParams["figure.figsize"] = (4, 3)
rcParams["font.family"] = "Serif"
rcParams["font.serif"] = ["Palatino"]
rcParams["font.serif"] = ["Times"]
rcParams["font.size"] = font_size
rcParams["axes.labelsize"] = font_size
rcParams["xtick.labelsize"] = font_size - 2
......@@ -28,7 +28,7 @@ rcParams["figure.subplot.top"] = 0.95
rcParams["figure.subplot.left"] = 0.2
rcParams["figure.subplot.bottom"] = 0.2
rcParams["image.cmap"] = "hot"
rcParams["image.cmap"] = "magma"
rcParams["text.usetex"] = True
......@@ -36,8 +36,8 @@ rcParams["ps.usedistiller"] = "xpdf"
rcParams["pdf.compression"] = 9
rcParams["ps.useafm"] = True
rcParams["path.simplify"] = True
rcParams["text.latex.preamble"] = [#"\usepackage{times}",
#"\usepackage{euler}",
rcParams["text.latex.preamble"] = [r"\usepackage{times}",
#r"\usepackage{euler}",
r"\usepackage{amssymb}",
r"\usepackage{amsmath}"]
......
......@@ -194,7 +194,7 @@ Edges and vertices can also be removed at any time with the
As a consequence, if more than one vertex is to be removed at a given
time, they should **always** be removed in decreasing index order:
.. code::
.. code-block::
# 'del_list' is a list of vertex descriptors
for v in reversed(sorted(del_list)):
......@@ -282,7 +282,7 @@ In order to iterate through all the vertices or edges of a graph, the
:meth:`~graph_tool.Graph.vertices` and :meth:`~graph_tool.Graph.edges`
methods should be used:
.. doctest::
.. testcode::
for v in g.vertices():
print(v)
......@@ -300,7 +300,7 @@ iterated through with the :meth:`~graph_tool.Vertex.out_edges`,
:meth:`~graph_tool.Vertex.in_edges`, :meth:`~graph_tool.Vertex.out_neighbors`
and :meth:`~graph_tool.Vertex.in_neighbors` methods, respectively.
.. doctest::
.. testcode::
from itertools import izip
for v in g.vertices():
......@@ -413,7 +413,7 @@ methods :meth:`~graph_tool.Graph.new_vertex_property` (alias
then accessed by vertex or edge descriptors, or the graph itself, as
such:
.. doctest::
.. testcode::
from itertools import izip
from numpy.random import randint
......@@ -433,7 +433,7 @@ such:
v = g.vertex(40)
vprop_vint[v] = [1, 3, 42, 54]
eprop_dict = g.new_edge_property("object") # Arbitrary python object.
eprop_dict = g.new_edge_property("object") # Arbitrary Python object.
e = g.edges().next()
eprop_dict[e] = {"foo": "bar", "gnu": 42} # In this case, a dict.
......@@ -445,7 +445,7 @@ Property maps with scalar value types can also be accessed as a
:meth:`~graph_tool.PropertyMap.get_array` method, or the
:attr:`~graph_tool.PropertyMap.a` attribute, e.g.,
.. doctest::
.. testcode::
from numpy.random import random
......@@ -536,7 +536,7 @@ and :attr:`~graph_tool.Graph.load` methods, which take either a file name or a
file-like object. A graph can also be loaded from disc with the
:func:`~graph_tool.load_graph` function, as such:
.. doctest::
.. testcode::
g = Graph()
# ... fill the graph ...
......@@ -563,7 +563,7 @@ in-degree. The following program implements this construction using
Note that it would be much faster just to use the
:func:`~graph_tool.generation.price_network` function, which is
implemented in C++, as opposed to the script below which is in pure
python. The code below is merely a demonstration on how to use the
Python. The code below is merely a demonstration on how to use the
library.
.. literalinclude:: price.py
......
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