mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-02 00:02:38 +02:00
Added extensions for inline doc plotting
This commit is contained in:
parent
8498332f76
commit
0763efcad4
2 changed files with 20 additions and 2 deletions
12
doc/conf.py
12
doc/conf.py
|
|
@ -126,7 +126,7 @@ for mod_name in MOCK_MODULES:
|
||||||
# If your extensions are in another directory, add it here. If the directory
|
# If your extensions are in another directory, add it here. If the directory
|
||||||
# is relative to the documentation root, use os.path.abspath to make it
|
# is relative to the documentation root, use os.path.abspath to make it
|
||||||
# absolute, like shown here.
|
# absolute, like shown here.
|
||||||
#sys.path.append(os.path.abspath('.'))
|
sys.path.append(os.path.abspath('sphinxext'))
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
# add these directories to sys.path here. If the directory is relative to the
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
|
|
@ -140,7 +140,15 @@ for mod_name in MOCK_MODULES:
|
||||||
|
|
||||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
|
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode',
|
||||||
|
'matplotlib.sphinxext.mathmpl',
|
||||||
|
'matplotlib.sphinxext.only_directives',
|
||||||
|
'matplotlib.sphinxext.plot_directive',
|
||||||
|
'matplotlib.sphinxext.ipython_directive',
|
||||||
|
'sphinx.ext.doctest',
|
||||||
|
'ipython_console_highlighting',
|
||||||
|
'inheritance_diagram',
|
||||||
|
'numpydoc']
|
||||||
|
|
||||||
# ----------------------- READTHEDOCS ------------------
|
# ----------------------- READTHEDOCS ------------------
|
||||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||||
|
|
|
||||||
|
|
@ -146,3 +146,13 @@ The flag ``ARD=True`` in the definition of the Matern kernel specifies that we w
|
||||||
:height: 350px
|
:height: 350px
|
||||||
|
|
||||||
Contour plot of the best predictor (posterior mean).
|
Contour plot of the best predictor (posterior mean).
|
||||||
|
|
||||||
|
.. plot::
|
||||||
|
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
import numpy as np
|
||||||
|
x = np.random.randn(1000)
|
||||||
|
plt.hist( x, 20)
|
||||||
|
plt.grid()
|
||||||
|
plt.title(r'Normal: $\mu=%.2f, \sigma=%.2f$'%(x.mean(), x.std()))
|
||||||
|
plt.show()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue