.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_ebands_boxplot.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code or to run this example in your browser via Binder .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_plot_ebands_boxplot.py: Seaborn boxplot =============== This example shows how to use seaborn to draw a box plot showing the distributions of eigenvalues with respect to the band index. .. GENERATED FROM PYTHON SOURCE LINES 9-17 .. code-block:: default from abipy.abilab import abiopen import abipy.data as abidata # Open the file with energies computed with a homogeneous sampling # of the BZ and extract the band structure. with abiopen(abidata.ref_file("si_scf_GSR.nc")) as gsr: ebands = gsr.ebands .. GENERATED FROM PYTHON SOURCE LINES 18-22 .. code-block:: default import matplotlib.pyplot as plt # Use `swarm=True` to show the datapoints on top of the boxes ebands.boxplot(swarm=True) plt.show() .. image:: /gallery/images/sphx_glr_plot_ebands_boxplot_001.png :alt: plot ebands boxplot :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.238 seconds) .. _sphx_glr_download_gallery_plot_ebands_boxplot.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/abinit/abipy/gh-pages?filepath=notebooks/gallery/plot_ebands_boxplot.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_ebands_boxplot.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_ebands_boxplot.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_