.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "intro/scipy/summary-exercises/auto_examples/plot_sprog_annual_maxima.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        :ref:`Go to the end <sphx_glr_download_intro_scipy_summary-exercises_auto_examples_plot_sprog_annual_maxima.py>`
        to download the full example code.

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_intro_scipy_summary-exercises_auto_examples_plot_sprog_annual_maxima.py:


The Gumbell distribution, results
=================================

Generate the exercise results on the Gumbell distribution

.. GENERATED FROM PYTHON SOURCE LINES 7-20



.. image-sg:: /intro/scipy/summary-exercises/auto_examples/images/sphx_glr_plot_sprog_annual_maxima_001.png
   :alt: plot sprog annual maxima
   :srcset: /intro/scipy/summary-exercises/auto_examples/images/sphx_glr_plot_sprog_annual_maxima_001.png
   :class: sphx-glr-single-img


.. rst-class:: sphx-glr-script-out

 .. code-block:: none


    Text(47.097222222222214, 0.5, 'Annual wind speed maxima [$m/s$]')





|

.. code-block:: Python


    import numpy as np
    import matplotlib.pyplot as plt

    years_nb = 21
    wspeeds = np.load("sprog-windspeeds.npy")
    max_speeds = np.array([arr.max() for arr in np.array_split(wspeeds, years_nb)])

    plt.figure()
    plt.bar(np.arange(years_nb) + 1, max_speeds)
    plt.axis("tight")
    plt.xlabel("Year")
    plt.ylabel("Annual wind speed maxima [$m/s$]")


.. rst-class:: sphx-glr-timing

   **Total running time of the script:** (0 minutes 0.208 seconds)


.. _sphx_glr_download_intro_scipy_summary-exercises_auto_examples_plot_sprog_annual_maxima.py:

.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-example

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download Jupyter notebook: plot_sprog_annual_maxima.ipynb <plot_sprog_annual_maxima.ipynb>`

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download Python source code: plot_sprog_annual_maxima.py <plot_sprog_annual_maxima.py>`

    .. container:: sphx-glr-download sphx-glr-download-zip

      :download:`Download zipped: plot_sprog_annual_maxima.zip <plot_sprog_annual_maxima.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_