.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/volcanology/plot_17_newhall_self_volcanic_explosivity_index.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 or to run this example in your browser via JupyterLite. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_volcanology_plot_17_newhall_self_volcanic_explosivity_index.py: Newhall and Self's Volcanic Explosivity Index (1982) ==================================================== Chris Newhall and Stephen Self combined erupted volume, column height and eyewitness descriptions into one index from 0 to 8, so that eruptions in the historical record could be compared. Above VEI 2 each step is a factor of ten in tephra volume. Approximate volumes of a few well-known eruptions place them on the scale. .. GENERATED FROM PYTHON SOURCE LINES 11-38 .. image-sg:: /api/gallery/volcanology/images/sphx_glr_plot_17_newhall_self_volcanic_explosivity_index_001.png :alt: One step per factor of ten :srcset: /api/gallery/volcanology/images/sphx_glr_plot_17_newhall_self_volcanic_explosivity_index_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from earthsciencekit.volcanology import volcanic_explosivity_index eruptions = { "Kilauea, lava lake": 1e3, "Stromboli, typical": 1e5, "Mount St Helens 1980": 1.0e9, "Pinatubo 1991": 1.0e10, "Tambora 1815": 1.5e11, "Toba, 74 ka": 2.8e12, } volume = np.array(list(eruptions.values())) index = volcanic_explosivity_index(volume) np.testing.assert_array_equal(index, [0, 1, 5, 6, 7, 8]) grid = np.logspace(2, 13, 600) fig, ax = plt.subplots() ax.semilogx(grid, volcanic_explosivity_index(grid), drawstyle="steps-post") for (name, v), i in zip(eruptions.items(), index): ax.plot(v, i, "ko") ax.annotate(name, (v, i), textcoords="offset points", xytext=(-6, 6), ha="right", fontsize=8) ax.set(xlabel="bulk tephra volume [m^3]", ylabel="VEI", title="One step per factor of ten", yticks=range(9)) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.112 seconds) .. _sphx_glr_download_api_gallery_volcanology_plot_17_newhall_self_volcanic_explosivity_index.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: lite-badge .. image:: images/jupyterlite_badge_logo.svg :target: ../../../lite/lab/index.html?path=api/gallery/volcanology/plot_17_newhall_self_volcanic_explosivity_index.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_17_newhall_self_volcanic_explosivity_index.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_17_newhall_self_volcanic_explosivity_index.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_17_newhall_self_volcanic_explosivity_index.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_