.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/1D_1_examples/plot_5_UV-vis.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_auto_examples_1D_1_examples_plot_5_UV-vis.py: Ultraviolet–visible (UV-vis) dataset ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. GENERATED FROM PYTHON SOURCE LINES 6-10 The following `UV-vis dataset `_ was obtained as a JCAMP-DX file, and subsequently converted to the CSD model file-format. The data structure of the UV-vis dataset follows, .. GENERATED FROM PYTHON SOURCE LINES 10-19 .. code-block:: Python import matplotlib.pyplot as plt import csdmpy as cp domain = "https://www.ssnmr.org/sites/default/files/CSDM" filename = f"{domain}/UV-vis/benzeneVapour_base64.csdf" UV_data = cp.load(filename) print(UV_data.data_structure) .. rst-class:: sphx-glr-script-out .. code-block:: none { "csdm": { "version": "1.0", "read_only": true, "timestamp": "2014-09-30T11:16:33Z", "description": "A UV-vis spectra of benzene vapours.", "dimensions": [ { "type": "linear", "count": 4001, "increment": "0.01 nm", "coordinates_offset": "230.0 nm", "quantity_name": "length", "label": "wavelength", "reciprocal": { "quantity_name": "wavenumber" } } ], "dependent_variables": [ { "type": "internal", "name": "Vapour of Benzene", "numeric_type": "float32", "quantity_type": "scalar", "component_labels": [ "Absorbance" ], "components": [ [ "0.25890622, 0.25923702, ..., 0.16814752, 0.16786034" ] ] } ] } } .. GENERATED FROM PYTHON SOURCE LINES 20-21 and the corresponding plot .. GENERATED FROM PYTHON SOURCE LINES 21-26 .. code-block:: Python plt.figure(figsize=(5, 3.5)) ax = plt.subplot(projection="csdm") ax.plot(UV_data) plt.tight_layout() plt.show() .. image-sg:: /auto_examples/1D_1_examples/images/sphx_glr_plot_5_UV-vis_001.png :alt: plot 5 UV vis :srcset: /auto_examples/1D_1_examples/images/sphx_glr_plot_5_UV-vis_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.347 seconds) .. _sphx_glr_download_auto_examples_1D_1_examples_plot_5_UV-vis.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_5_UV-vis.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_5_UV-vis.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_