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

    Click :ref:`here <sphx_glr_download_auto_examples_plot_seaborn.py>` to download the full example code or run this example in your browser via Binder
.. rst-class:: sphx-glr-example-title

.. _sphx_glr_auto_examples_plot_seaborn.py:


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

Preview the capture of seaborn styles in plots




.. image:: /auto_examples/images/sphx_glr_plot_seaborn_001.png
    :class: sphx-glr-single-img





.. code-block:: python

    # Author: Michael Waskom
    # License: BSD 3 clause

    from __future__ import division, absolute_import, print_function


    import numpy as np
    import seaborn as sns

    # Enforce the use of default set style
    #sns.set(style="darkgrid", palette="Set2")

    # Create a noisy periodic dataset
    sines = []
    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, .3, 30)
        sines.append(y)

    # Plot the average over replicates with bootstrap resamples
    sns.tsplot(sines, err_style="boot_traces", n_boot=500)

**Total running time of the script:** ( 0 minutes  0.403 seconds)


.. _sphx_glr_download_auto_examples_plot_seaborn.py:


.. only :: html

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


  .. container:: binder-badge

    .. image:: https://static.mybinder.org/badge.svg
      :target: https://mybinder.org/v2/gh/sphinx-gallery/sphinx-gallery.github.io/master?urlpath=lab/tree/notebooks/auto_examples/plot_seaborn.ipynb
      :width: 150 px


  .. container:: sphx-glr-download

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



  .. container:: sphx-glr-download

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


.. only:: html

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

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