Commit 9b147c0d authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Stylistic changes to the documentation

parent dccf2873
......@@ -13,6 +13,8 @@
/* webfonts */
@import url("//fonts.googleapis.com/css?family=Droid+Serif:400,400italic,700,700italic|Droid+Sans+Mono");
@import url("./font-awesome-4.2.0/css/font-awesome.css");
/* -- page layout ----------------------------------------------------------- */
body {
......@@ -26,6 +28,7 @@ body {
div.document {
background: #fafafa;
margin-bottom: 40px;
}
div.documentwrapper {
......@@ -46,6 +49,7 @@ div.body {
color: #333333;
padding: 0 30px 30px 30px;
min-height: 34em;
max-width: 60em;
}
img.floatingflask {
......@@ -56,7 +60,7 @@ img.floatingflask {
div.footer {
position: absolute;
right: 0;
margin-top: -70px;
margin-top: -60px;
text-align: right;
color: #888;
padding: 10px;
......@@ -197,19 +201,29 @@ div.body p, div.body dd, div.body li {
div.admonition {
background: #fafafa;
margin: 20px -30px;
padding: 10px 30px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
/*margin: 20px -30px;*/
padding: 0px 12px 12px 12px;
/* line-height: 24px; */
margin-bottom: 24px;
margin-top: 12px;
/* padding: 10px 30px; */
/* border-top: 1px solid #ccc; */
/* border-bottom: 1px solid #ccc; */
}
div.admonition p.admonition-title {
font-family: 'Droid Serif', serif;
font-weight: normal;
font-size: 24px;
margin: 0 0 10px 0;
padding: 0;
/* margin: 0 0 10px 0; */
/* padding: 0; */
line-height: 1;
display: block;
color: #FFF;
margin: -12px -12px 12px;
padding: 6px 12px;
}
div.admonition p.last {
......@@ -225,9 +239,13 @@ dt:target, .highlight {
}
div.note {
background-color: #eee;
border: 1px solid #ccc;
background: none repeat scroll 0% 0% #E7F2FA;
}
div.note p.first.admonition-title {
background: none repeat scroll 0% 0% #6AB0DE;
}
div.seealso {
background-color: #ffc;
......@@ -239,16 +257,33 @@ div.topic {
}
div.warning {
background-color: #ffe4e4;
border: 1px solid #f66;
background: none repeat scroll 0% 0% #FFEDCC;
}
p.admonition-title {
display: inline;
div.warning p.first.admonition-title {
background: none repeat scroll 0% 0% #F0B37E;
}
/* p.admonition-title { */
/* display: inline; */
/* } */
p.admonition-title:after {
content: ":";
/* p.admonition-title:after { */
/* content: ":"; */
/* } */
p.admonition-title:before {
content: "\f06a ";
margin-right: 6px;
font-family: "FontAwesome";
}
div.seealso p.first.admonition-title {
color: inherit;
}
div.seealso p.admonition-title:before {
content: none;
}
pre, tt {
......@@ -321,14 +356,13 @@ dl dd {
}
dl.function, dl.class, dl.exception {
border-top-style: solid;
border-top-width: 5px;
padding-top: 1em;
border-top: 3px solid #6AB0DE;
/* padding-top: 1em; */
clear: both;
}
dl.function dt, dl.class dt, dl.exception dt{
background-color: #EFEFEF;
background-color: #E7F2FA;
}
dl.docutils dt {
......@@ -366,4 +400,35 @@ tt.xref, a tt {
/* a:hover tt { */
/* background: #EEE; */
/* } */
\ No newline at end of file
/* } */
.toctree-wrapper ul
{
list-style-type: none;
}
ul li.toctree-l1 {
text-indent: -1.4em;
}
ul li.toctree-l1:before {
font-family: "FontAwesome";
content: "\f101";
float: left;
width: 1em;
}
ul li ul li.toctree-l2:before {
font-family: "FontAwesome";
content: "\f105";
float: left;
width: 1em;
}
ul li ul li ul li.toctree-l3:before {
font-family: "FontAwesome";
content: "\f0da";
float: left;
width: 1em;
}
@import url("flasky.css");
table.docutils {
margin-left:1em;
margin-left:1em;
margin-right:1em;
border: 0px;
}
table.docutils td {
......@@ -17,17 +18,37 @@ table.docutils.field-list {
}
table.docutils td.field-body {
border-left: 1px solid #BBBBBB !important;
border-left: 2px solid #E7F2FA !important;
border-collapse: separate !important;
padding-left: 1em;
}
table.docutils tbody tr:nth-child(odd) {
background-color:#EFEFEF
}
table.docutils.field-list tbody tr:nth-child(odd) {
background-color: inherit;
}
table.docutils.citation tbody tr:nth-child(odd) {
background-color: inherit;
}
table.docutils td, table.docutils tr, table.docutils th {
border: 0px;
padding-left: 0.5em;
}
table.docutils.citation
{
margin-left: 0;
margin-right: 0;
}
/* stupid workaround to hide ugly c++ signature stuff from sphinx*/
/* dl.function dl.docutils dl.last { */
/* visibility: collapse; */
......@@ -61,6 +82,10 @@ p.rubric {
clear: both;
}
table.docutils {
box-shadow: none;
}
table.docutils td {
padding-left: 0.5em;
}
......@@ -71,6 +96,10 @@ table.citation td, table.citation th, table.citation {
padding: 0.25em 0.7em;
}
table.citation td.label {
width: 8em;
}
.container.sec-title {
font-size: 150%;
font-weight: normal;
......@@ -81,16 +110,16 @@ table.citation td, table.citation th, table.citation {
padding-bottom: 0.2em;
}
div.admonition {
margin-left: auto;
margin-right: auto;
padding-left: 1em;
width: 80%;
}
/* div.admonition { */
/* margin-left: auto; */
/* margin-right: auto; */
/* padding-left: 1em; */
/* width: 80%; */
/* } */
div.admonition p.admonition-title + p {
margin-top: 0.5em;
}
/* div.admonition p.admonition-title + p { */
/* margin-top: 0.5em; */
/* } */
div.seealso {
margin-left: 0;
......@@ -111,5 +140,6 @@ dl pre {
pre {
margin-left: 0;
padding-left: 1em;
margin-right: 0px;
}
......@@ -2,8 +2,8 @@ from matplotlib import rc
from matplotlib import rcParams
font_size=14
rcParams["backend"] = "Cairo"
rcParams["figure.figsize"] = (6,6)
rcParams["backend"] = "PDF"
rcParams["figure.figsize"] = (4, 3)
rcParams["font.family"] = "Serif"
rcParams["font.serif"] = ["Palatino"]
rcParams["font.size"] = font_size
......@@ -20,6 +20,8 @@ rcParams["figure.subplot.top"] = 0.95
rcParams["figure.subplot.left"] = 0.2
rcParams["figure.subplot.bottom"] = 0.2
rcParams["image.cmap"] = "hot"
rcParams["text.usetex"] = True
rcParams["ps.usedistiller"] = "xpdf"
......
......@@ -530,16 +530,16 @@ use the :func:`~graph_tool.draw.graph_draw` function.
g = load_graph("price.xml.gz")
age = g.vertex_properties["age"]
pos = sfdp_layout(g, cooling_step=0.99)
graph_draw(g, pos, output_size=(1000, 1000), vertex_color=age,
pos = sfdp_layout(g)
graph_draw(g, pos, output_size=(1000, 1000), vertex_color=[1,1,1,0],
vertex_fill_color=age, vertex_size=1, edge_pen_width=1.2,
output="price.png")
vcmap=matplotlib.cm.gist_heat_r, output="price.png")
.. figure:: price.*
:align: center
A Price network with :math:`10^5` nodes. The vertex colors represent
the age of the vertex, from older (red) to newer (blue).
the age of the vertex, from older (red) to newer (black).
.. _sec_graph_filtering:
......
......@@ -218,7 +218,8 @@ def random_graph(N, deg_sampler, directed=True,
>>>
>>> hist = gt.combined_corr_hist(g, "in", "out")
>>>
>>> clf()
>>> figure()
<...>
>>> imshow(hist[0].T, interpolation="nearest", origin="lower")
<...>
>>> colorbar()
......@@ -260,7 +261,8 @@ def random_graph(N, deg_sampler, directed=True,
Lets plot the average degree correlations to check.
>>> clf()
>>> figure(8, 5)
<...>
>>> axes([0.1,0.15,0.63,0.8])
<...>
>>> corr = gt.avg_neighbour_corr(g, "in", "in")
......@@ -659,7 +661,7 @@ def random_rewire(g, model="uncorrelated", n_iter=1, edge_sweep=True,
We can try with larger graphs to get better statistics, as follows.
>>> figure()
>>> figure(8, 5)
<...>
>>> g = gt.random_graph(30000, lambda: sample_k(20), model="probabilistic",
... vertex_corr=lambda i, j: exp(abs(i-j)), directed=False,
......@@ -711,7 +713,7 @@ def random_rewire(g, model="uncorrelated", n_iter=1, edge_sweep=True,
... model="probabilistic",
... vertex_corr=lambda a, b: (p.pmf(a[0], b[1]) * p.pmf(a[1], 20 - b[0])),
... n_iter=100)
>>> figure()
>>> figure(8, 5)
<...>
>>> axes([0.1,0.15,0.6,0.8])
<...>
......
Supports Markdown
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