diff --git a/doc/conf.py b/doc/conf.py index 54135023..6a6eedfe 100644 --- a/doc/conf.py +++ b/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 # is relative to the documentation root, use os.path.abspath to make it # 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, # 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 # 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 ------------------ on_rtd = os.environ.get('READTHEDOCS', None) == 'True' diff --git a/doc/tuto_GP_regression.rst b/doc/tuto_GP_regression.rst index 7d1a43df..a713eb4c 100644 --- a/doc/tuto_GP_regression.rst +++ b/doc/tuto_GP_regression.rst @@ -146,3 +146,13 @@ The flag ``ARD=True`` in the definition of the Matern kernel specifies that we w :height: 350px 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()