.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_edos_grid.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_plot_edos_grid.py: ElectronDosPlotter ================== This example shows how to plot several Electron Dos on a grid using the results stored in the ni_666k_GSR.nc file. .. GENERATED FROM PYTHON SOURCE LINES 11-14 We start by defining a list with the paths to the GSR.nc files In this case, for simplicity, we use the same file but we must use different labels when adding them to the plotter with the add_edos method. .. GENERATED FROM PYTHON SOURCE LINES 14-24 .. code-block:: Python from abipy import abilab import abipy.data as abidata edos_paths = [abidata.ref_file("ni_666k_GSR.nc")] plotter = abilab.ElectronDosPlotter() plotter.add_edos("Ni", edos_paths[0]) plotter.add_edos("Same Ni", edos_paths[0]) .. GENERATED FROM PYTHON SOURCE LINES 25-26 To visualize the results on a grid with matplotlib, use: .. GENERATED FROM PYTHON SOURCE LINES 26-28 .. code-block:: Python plotter.gridplot(title="Electron DOS on grid") .. image-sg:: /gallery/images/sphx_glr_plot_edos_grid_001.png :alt: Electron DOS on grid, Ni, Same Ni :srcset: /gallery/images/sphx_glr_plot_edos_grid_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 29-30 Plotly version: .. GENERATED FROM PYTHON SOURCE LINES 30-32 .. code-block:: Python plotter.gridplotly(title="Electron DOS on grid") .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.277 seconds) .. _sphx_glr_download_gallery_plot_edos_grid.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_edos_grid.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_edos_grid.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_edos_grid.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_