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
26903a78
Commit
26903a78
authored
Mar 23, 2020
by
Tiago Peixoto
Browse files
Update documentation
parent
83db893e
Changes
3
Hide whitespace changes
Inline
Side-by-side
doc/demos/inference/_minimization.rst
View file @
26903a78
...
...
@@ -309,6 +309,9 @@ recommended.
print("Improvement:", S2 - S1)
One run of the above code yields a modest improvement, but depending
on the dataset the difference can be larger:
.. testoutput:: celegans-mcmc-combine
Improvement: -82.616161...
\ No newline at end of file
doc/demos/inference/_model_selection.rst
View file @
26903a78
...
...
@@ -25,8 +25,8 @@ we have
.. testoutput:: model-selection
:options: +NORMALIZE_WHITESPACE
Non-degree-corrected DL:
8520.825480...
Degree-corrected DL:
8227.987410...
Non-degree-corrected DL:
8520.825480...
Degree-corrected DL:
8227.987410...
Since it yields the smallest description length, the degree-corrected
fit should be preferred. The statistical significance of the choice can
...
...
doc/demos/matplotlib/matplotlib.rst
View file @
26903a78
...
...
@@ -8,12 +8,17 @@ as we demonstrate in the following.
.. note::
Since ``graph-tool`` uses `cairo <https://cairographics.org>`_ for
drawing, it is necessary to use matplotlib's cairo backend, otherwise
integration is not possible. The cairo backend can be used by calling:
drawing, it is necessary to one of matplotlib's cairo-based backend,
otherwise integration is not possible. Currently, two backends can be
chosen: ``cairo`` or ``GTK3Cairo``. The latter should be chosen for
interactive GUI-based figures. The backend can be changed by calling
:func:`matplotlib.pyplot.switch_backend`:
.. code::
switch_backend("cairo")
import matplotlib.pyplot as plt
plt.switch_backend("cairo")
Drawing with matplotlib is done by calling
...
...
@@ -26,9 +31,12 @@ Drawing with matplotlib is done by calling
.. testcode::
switch_backend("cairo")
import graph_tool.all as gt
import matplotlib.pyplot as plt
plt.switch_backend("cairo")
fig, ax = subplots(2, 2, figsize=(12, 11.5))
fig, ax =
plt.
subplots(2, 2, figsize=(12, 11.5))
g = gt.collection.data["polbooks"]
...
...
@@ -57,7 +65,7 @@ Drawing with matplotlib is done by calling
ax[1,1].set_xlabel("$x$ coordinate")
ax[1,1].set_ylabel("$y$ coordinate")
subplots_adjust(left=0.08, right=0.99, top=0.99, bottom=0.06)
plt.
subplots_adjust(left=0.08, right=0.99, top=0.99, bottom=0.06)
fig.savefig("gt-mpl.pdf")
...
...
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