summaryrefslogtreecommitdiff
path: root/docs/source/auto_examples/plot_barycenter_1D.rst
diff options
context:
space:
mode:
authorRémi Flamary <remi.flamary@gmail.com>2018-02-16 15:04:04 +0100
committerRémi Flamary <remi.flamary@gmail.com>2018-02-16 15:04:04 +0100
commitee19d423adc85a960c9a46e4f81c370196805dbf (patch)
tree1c0bc21a605d0097616c26cfdb846fc744ed43a0 /docs/source/auto_examples/plot_barycenter_1D.rst
parentefdbf9e4fe9295fb1bec893e8aaa9102537cb7f5 (diff)
update notebooks
Diffstat (limited to 'docs/source/auto_examples/plot_barycenter_1D.rst')
-rw-r--r--docs/source/auto_examples/plot_barycenter_1D.rst125
1 files changed, 47 insertions, 78 deletions
diff --git a/docs/source/auto_examples/plot_barycenter_1D.rst b/docs/source/auto_examples/plot_barycenter_1D.rst
index f17f2c2..5b627ca 100644
--- a/docs/source/auto_examples/plot_barycenter_1D.rst
+++ b/docs/source/auto_examples/plot_barycenter_1D.rst
@@ -18,34 +18,52 @@ SIAM Journal on Scientific Computing, 37(2), A1111-A1138.
-.. code-block:: python
+.. rst-class:: sphx-glr-horizontal
- # Author: Remi Flamary <remi.flamary@unice.fr>
- #
- # License: MIT License
- import numpy as np
- import matplotlib.pylab as pl
- import ot
- # necessary for 3d plot even if not used
- from mpl_toolkits.mplot3d import Axes3D # noqa
- from matplotlib.collections import PolyCollection
+ *
+ .. image:: /auto_examples/images/sphx_glr_plot_barycenter_1D_001.png
+ :scale: 47
+ *
+ .. image:: /auto_examples/images/sphx_glr_plot_barycenter_1D_002.png
+ :scale: 47
+ *
+ .. image:: /auto_examples/images/sphx_glr_plot_barycenter_1D_003.png
+ :scale: 47
+
+ *
+
+ .. image:: /auto_examples/images/sphx_glr_plot_barycenter_1D_004.png
+ :scale: 47
-Generate data
--------------
.. code-block:: python
+ # Author: Remi Flamary <remi.flamary@unice.fr>
+ #
+ # License: MIT License
+
+ import numpy as np
+ import matplotlib.pylab as pl
+ import ot
+ # necessary for 3d plot even if not used
+ from mpl_toolkits.mplot3d import Axes3D # noqa
+ from matplotlib.collections import PolyCollection
+
+ #
+ # Generate data
+ # -------------
+
#%% parameters
n = 100 # nb bins
@@ -65,19 +83,9 @@ Generate data
M = ot.utils.dist0(n)
M /= M.max()
-
-
-
-
-
-
-Plot data
----------
-
-
-
-.. code-block:: python
-
+ #
+ # Plot data
+ # ---------
#%% plot the distributions
@@ -87,22 +95,9 @@ Plot data
pl.title('Distributions')
pl.tight_layout()
-
-
-
-.. image:: /auto_examples/images/sphx_glr_plot_barycenter_1D_001.png
- :align: center
-
-
-
-
-Barycenter computation
-----------------------
-
-
-
-.. code-block:: python
-
+ #
+ # Barycenter computation
+ # ----------------------
#%% barycenter computation
@@ -130,22 +125,9 @@ Barycenter computation
pl.title('Barycenters')
pl.tight_layout()
-
-
-
-.. image:: /auto_examples/images/sphx_glr_plot_barycenter_1D_003.png
- :align: center
-
-
-
-
-Barycentric interpolation
--------------------------
-
-
-
-.. code-block:: python
-
+ #
+ # Barycentric interpolation
+ # -------------------------
#%% barycenter interpolation
@@ -212,29 +194,13 @@ Barycentric interpolation
pl.show()
-
-
-.. rst-class:: sphx-glr-horizontal
-
-
- *
-
- .. image:: /auto_examples/images/sphx_glr_plot_barycenter_1D_005.png
- :scale: 47
-
- *
-
- .. image:: /auto_examples/images/sphx_glr_plot_barycenter_1D_006.png
- :scale: 47
+**Total running time of the script:** ( 0 minutes 0.636 seconds)
+.. only :: html
-**Total running time of the script:** ( 0 minutes 0.814 seconds)
-
-
-
-.. container:: sphx-glr-footer
+ .. container:: sphx-glr-footer
.. container:: sphx-glr-download
@@ -247,6 +213,9 @@ Barycentric interpolation
:download:`Download Jupyter notebook: plot_barycenter_1D.ipynb <plot_barycenter_1D.ipynb>`
-.. rst-class:: sphx-glr-signature
- `Generated by Sphinx-Gallery <http://sphinx-gallery.readthedocs.io>`_
+.. only:: html
+
+ .. rst-class:: sphx-glr-signature
+
+ `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.readthedocs.io>`_