From e65606ae498bd611f6a994868c2a66dfbea403cd Mon Sep 17 00:00:00 2001 From: RĂ©mi Flamary Date: Mon, 20 Apr 2020 15:19:09 +0200 Subject: big update examples --- docs/source/auto_examples/plot_otda_d2.rst | 66 ++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 22 deletions(-) (limited to 'docs/source/auto_examples/plot_otda_d2.rst') diff --git a/docs/source/auto_examples/plot_otda_d2.rst b/docs/source/auto_examples/plot_otda_d2.rst index 80cc34c..6d8e429 100644 --- a/docs/source/auto_examples/plot_otda_d2.rst +++ b/docs/source/auto_examples/plot_otda_d2.rst @@ -1,6 +1,12 @@ +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + Click :ref:`here ` to download the full example code + .. rst-class:: sphx-glr-example-title -.. _sphx_glr_auto_examples_plot_otda_d2.py: + .. _sphx_glr_auto_examples_plot_otda_d2.py: =================================================== @@ -16,8 +22,7 @@ transported samples are represented in order to give a visual understanding of what the transport methods are doing. - -.. code-block:: python +.. code-block:: default # Authors: Remi Flamary @@ -35,12 +40,12 @@ of what the transport methods are doing. + generate data ------------- - -.. code-block:: python +.. code-block:: default n_samples_source = 150 @@ -59,12 +64,12 @@ generate data + Instantiate the different transport algorithms and fit them ----------------------------------------------------------- - -.. code-block:: python +.. code-block:: default # EMD Transport @@ -91,12 +96,12 @@ Instantiate the different transport algorithms and fit them + Fig 1 : plots source and target samples + matrix of pairwise distance --------------------------------------------------------------------- - -.. code-block:: python +.. code-block:: default pl.figure(1, figsize=(10, 10)) @@ -126,7 +131,8 @@ Fig 1 : plots source and target samples + matrix of pairwise distance .. image:: /auto_examples/images/sphx_glr_plot_otda_d2_001.png - :align: center + :class: sphx-glr-single-img + @@ -135,8 +141,7 @@ Fig 2 : plots optimal couplings for the different methods --------------------------------------------------------- - -.. code-block:: python +.. code-block:: default pl.figure(2, figsize=(10, 6)) @@ -187,8 +192,9 @@ Fig 2 : plots optimal couplings for the different methods -.. image:: /auto_examples/images/sphx_glr_plot_otda_d2_003.png - :align: center +.. image:: /auto_examples/images/sphx_glr_plot_otda_d2_002.png + :class: sphx-glr-single-img + @@ -197,8 +203,7 @@ Fig 3 : plot transported samples -------------------------------- - -.. code-block:: python +.. code-block:: default # display transported samples @@ -236,28 +241,45 @@ Fig 3 : plot transported samples -.. image:: /auto_examples/images/sphx_glr_plot_otda_d2_006.png - :align: center +.. image:: /auto_examples/images/sphx_glr_plot_otda_d2_003.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + Out: + .. code-block:: none + /home/rflamary/PYTHON/POT/examples/plot_otda_d2.py:172: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. + pl.show() -**Total running time of the script:** ( 0 minutes 35.515 seconds) +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 21.323 seconds) + + +.. _sphx_glr_download_auto_examples_plot_otda_d2.py: + + .. only :: html .. container:: sphx-glr-footer + :class: sphx-glr-footer-example + - .. container:: sphx-glr-download + .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_otda_d2.py ` - .. container:: sphx-glr-download + .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_otda_d2.ipynb ` @@ -266,4 +288,4 @@ Fig 3 : plot transported samples .. rst-class:: sphx-glr-signature - `Gallery generated by Sphinx-Gallery `_ + `Gallery generated by Sphinx-Gallery `_ -- cgit v1.2.3