.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_fermisurface.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_fermisurface.py: MgB2 Fermi surface ================== This example shows how to plot the Fermi surface with matplotlib .. GENERATED FROM PYTHON SOURCE LINES 8-27 .. image:: /gallery/images/sphx_glr_plot_fermisurface_001.png :alt: plot fermisurface :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none
| .. code-block:: default from abipy import abilab import abipy.data as abidata with abilab.abiopen(abidata.ref_file("mgb2_kmesh181818_FATBANDS.nc")) as fbnc_kmesh: ebands = fbnc_kmesh.ebands # Build ebands in full BZ. eb3d = ebands.get_ebands3d() # Use matplotlib to plot isosurfaces corresponding to the Fermi level (default) # Warning: requires skimage package, rendering could be slow. eb3d.plot_isosurfaces() # Alternatively, it's possible to export the data in xcrysden format # and then use `xcrysden --bxsf mgb2.bxsf` #eb3d.to_bxsf("mgb2.bxsf") # If you have mayavi installed, try: #eb3d.mvplot_isosurfaces() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.376 seconds) .. _sphx_glr_download_gallery_plot_fermisurface.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_fermisurface.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_fermisurface.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_fermisurface.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_