
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "examples\00-band_structure\plot_compare_bands.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

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

        :ref:`Go to the end <sphx_glr_download_examples_00-band_structure_plot_compare_bands.py>`
        to download the full example code.

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_examples_00-band_structure_plot_compare_bands.py:


.. _ref_plotting_compare_bands:

Comparing band structures
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Comparing band structures example.

First download the example files with the code below. Then replace data_dir below.

.. code-block::
   :caption: Downloading example

    vasp_data_dir = pyprocar.download_example(save_dir='', 
                                material='Fe',
                                code='vasp', 
                                spin_calc_type='non-spin-polarized',
                                calc_type='bands')

    qe_data_dir = pyprocar.download_example(save_dir='', 
                                material='Fe',
                                code='qe', 
                                spin_calc_type='non-spin-polarized',
                                calc_type='bands')

.. GENERATED FROM PYTHON SOURCE LINES 29-31

importing pyprocar and specifying local data_dir


.. GENERATED FROM PYTHON SOURCE LINES 31-43

.. code-block:: Python


    import os

    import pyprocar

    vasp_data_dir = os.path.join(
        pyprocar.utils.DATA_DIR, "examples", "Fe", "vasp", "non-spin-polarized", "bands"
    )
    qe_data_dir = os.path.join(
        pyprocar.utils.DATA_DIR, "examples", "Fe", "qe", "non-spin-polarized", "bands"
    )








.. GENERATED FROM PYTHON SOURCE LINES 44-46

When show is equal to False, bandsplot will return a maplotlib.Figure and maplotlib.axes.Axes object


.. GENERATED FROM PYTHON SOURCE LINES 46-66

.. code-block:: Python


    fig, ax = pyprocar.bandsplot(
        code="vasp",
        dirname=vasp_data_dir,
        mode="parametric",
        fermi=5.599480,
        elimit=[-5, 5],
        orbitals=[4, 5, 6, 7, 8],
        show=False,
    )
    pyprocar.bandsplot(
        code="qe",
        dirname=qe_data_dir,
        mode="plain",
        fermi=18.2398,
        elimit=[-5, 5],
        color="k",
        ax=ax,
        show=True,
    )



.. image-sg:: /examples/00-band_structure/images/sphx_glr_plot_compare_bands_001.png
   :alt: plot compare bands
   :srcset: /examples/00-band_structure/images/sphx_glr_plot_compare_bands_001.png
   :class: sphx-glr-single-img


.. rst-class:: sphx-glr-script-out

 .. code-block:: none


                ----------------------------------------------------------------------------------------------------------
                There are additional plot options that are defined in the configuration file. 
                You can change these configurations by passing the keyword argument to the function.
                To print a list of all plot options set `print_plot_opts=True`

                Here is a list modes : plain , parametric , scatter , atomic , overlay , overlay_species , overlay_orbitals
                ----------------------------------------------------------------------------------------------------------
            

                ----------------------------------------------------------------------------------------------------------
                There are additional plot options that are defined in the configuration file. 
                You can change these configurations by passing the keyword argument to the function.
                To print a list of all plot options set `print_plot_opts=True`

                Here is a list modes : plain , parametric , scatter , atomic , overlay , overlay_species , overlay_orbitals
                ----------------------------------------------------------------------------------------------------------
            

    (<Figure size 900x600 with 2 Axes>, <Axes: xlabel='K vector', ylabel='E - E$_F$ (eV)'>)




.. rst-class:: sphx-glr-timing

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


.. _sphx_glr_download_examples_00-band_structure_plot_compare_bands.py:

.. only:: html

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

    .. container:: sphx-glr-download sphx-glr-download-jupyter

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

    .. container:: sphx-glr-download sphx-glr-download-python

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

    .. container:: sphx-glr-download sphx-glr-download-zip

      :download:`Download zipped: plot_compare_bands.zip <plot_compare_bands.zip>`


.. only:: html

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

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