.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "11_demos\python_packages\seaborn\demo_violinplots.py" .. LINE NUMBERS ARE GIVEN BELOW. .. 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_11_demos_python_packages_seaborn_demo_violinplots.py: Violinplots ============== .. GENERATED FROM PYTHON SOURCE LINES 5-16 .. image-sg:: /11_demos/python_packages/seaborn/images/sphx_glr_demo_violinplots_001.png :alt: demo violinplots :srcset: /11_demos/python_packages/seaborn/images/sphx_glr_demo_violinplots_001.png :class: sphx-glr-single-img .. code-block:: default import seaborn as sns sns.set_theme(style="whitegrid") # Load the example tips dataset tips = sns.load_dataset("tips") # Draw a nested violinplot and split the violins for easier comparison sns.violinplot(data=tips, x="day", y="total_bill", hue="smoker", split=True, inner="quart", linewidth=1, palette={"Yes": "b", "No": ".85"}) sns.despine(left=True) .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.164 seconds) .. _sphx_glr_download_11_demos_python_packages_seaborn_demo_violinplots.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: demo_violinplots.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: demo_violinplots.ipynb `