.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_xrd.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_xrd.py: X-ray diffraction pattern ========================= This example shows how to plot the X-ray diffraction pattern with pymatgen .. GENERATED FROM PYTHON SOURCE LINES 8-15 .. code-block:: Python from abipy import abilab import abipy.data as abidata # Extract the structure (supports multiple formats e.g netcdf, Abinit input, cif, POSCAR) # Also available via the `abistruct.py xrd FILE` command line interface. structure = abilab.Structure.from_file(abidata.ref_file("si_scf_WFK.nc")) .. GENERATED FROM PYTHON SOURCE LINES 16-17 Plot the XRD spectrum. .. GENERATED FROM PYTHON SOURCE LINES 17-18 .. code-block:: Python structure.plot_xrd() .. image-sg:: /gallery/images/sphx_glr_plot_xrd_001.png :alt: plot xrd :srcset: /gallery/images/sphx_glr_plot_xrd_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.079 seconds) .. _sphx_glr_download_gallery_plot_xrd.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_xrd.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_xrd.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_xrd.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_