
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "auto_examples/plot_2_seaborn.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        :ref:`Go to the end <sphx_glr_download_auto_examples_plot_2_seaborn.py>`
        to download the full example code or to run this example in your browser via Binder.

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_auto_examples_plot_2_seaborn.py:


Seaborn example
===============

This example demonstrates a Seaborn plot. Figures produced Matplotlib **and**
by any package that is based on Matplotlib (e.g., Seaborn), will be
captured by default. See :ref:`image_scrapers` for details.

.. GENERATED FROM PYTHON SOURCE LINES 9-34



.. image-sg:: /auto_examples/images/sphx_glr_plot_2_seaborn_001.png
   :alt: plot 2 seaborn
   :srcset: /auto_examples/images/sphx_glr_plot_2_seaborn_001.png, /auto_examples/images/sphx_glr_plot_2_seaborn_001_2_00x.png 2.00x
   :class: sphx-glr-single-img





.. code-block:: Python


    # Author: Michael Waskom & Lucy Liu
    # License: BSD 3 clause
    # sphinx_gallery_tags = ["matplotlib","line-plot","seaborn"]

    import matplotlib.pyplot as plt
    import numpy as np
    import seaborn as sns

    # Enforce the use of default set style

    # Create a noisy periodic dataset
    y_array = np.array([])
    x_array = np.array([])
    rs = np.random.RandomState(8)
    for _ in range(15):
        x = np.linspace(0, 30 / 2, 30)
        y = np.sin(x) + rs.normal(0, 1.5) + rs.normal(0, 0.3, 30)
        y_array = np.append(y_array, y)
        x_array = np.append(x_array, x)

    # Plot the average over replicates with confidence interval
    sns.lineplot(y=y_array, x=x_array)
    # to avoid text output
    plt.show()


.. rst-class:: sphx-glr-example-tags

   🏷 Tags: matplotlib, line-plot, seaborn


.. _sphx_glr_download_auto_examples_plot_2_seaborn.py:

.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-example

    .. container:: binder-badge

      .. image:: images/binder_badge_logo.svg
        :target: https://mybinder.org/v2/gh/sphinx-gallery/sphinx-gallery.github.io/master?urlpath=lab/tree/notebooks/auto_examples/plot_2_seaborn.ipynb
        :alt: Launch binder
        :width: 150 px

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download Jupyter notebook: plot_2_seaborn.ipynb <plot_2_seaborn.ipynb>`

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download Python source code: plot_2_seaborn.py <plot_2_seaborn.py>`

    .. container:: sphx-glr-download sphx-glr-download-zip

      :download:`Download zipped: plot_2_seaborn.zip <plot_2_seaborn.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
