# 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.

Out:

/Users/gmatteo/git_repos/pymatgen/pymatgen/util/plotting.py:550: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
plt.show()
/Users/gmatteo/git_repos/abipy/abipy/examples/plot/plot_ebands_boxplot.py:20: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
plt.show()


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

import matplotlib.pyplot as plt
# swarm=True to show the datapoints on top of the boxes
ebands.boxplot(swarm=True)
plt.show()


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

Gallery generated by Sphinx-Gallery