.. 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 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_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-19 .. image:: /gallery/images/sphx_glr_plot_xrd_001.png :alt: plot xrd :class: sphx-glr-single-img .. code-block:: default 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")) import sys if sys.version[0:3] > '2.7': # pmg broke py compatibility structure.plot_xrd() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.101 seconds) .. _sphx_glr_download_gallery_plot_xrd.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_xrd.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_xrd.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_xrd.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_