.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_plot_xy.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_plot_xy.py: Example with sphinx-gallery =========================== Simple example avec `sphinx-gallery `_. Dummy example with `sphinx-gallery `_. .. GENERATED FROM PYTHON SOURCE LINES 11-30 .. image-sg:: /auto_examples/images/sphx_glr_plot_plot_xy_001.png :alt: One curve., Two curves on the same graphs. :srcset: /auto_examples/images/sphx_glr_plot_plot_xy_001.png :class: sphx-glr-single-img .. code-block:: default import numpy import matplotlib.pyplot as plt from td2a_plotting import plot_xy data1 = numpy.random.rand(200, 2) data2 = numpy.random.rand(200, 2) + 2 data3 = numpy.random.rand(200, 2) + 2 data3[:, 1] += 1 fig, ax = plt.subplots(1, 2, figsize=(12, 4)) plot_xy(data1, ax=ax[0], label="D1") plot_xy(data2, ax=ax[1], label="D2") plot_xy(data3, ax=ax[1], label="D3") ax[0].set_title("One curve.") ax[1].set_title("Two curves on the same graphs.") plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.910 seconds) .. _sphx_glr_download_auto_examples_plot_plot_xy.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_plot_xy.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_plot_xy.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_