
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "gallery/images_contours_and_fields/quiver_simple_demo.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

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

        Click :ref:`here <sphx_glr_download_gallery_images_contours_and_fields_quiver_simple_demo.py>`
        to download the full example code

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

.. _sphx_glr_gallery_images_contours_and_fields_quiver_simple_demo.py:


==================
Quiver Simple Demo
==================

A simple example of a `~.axes.Axes.quiver` plot with a `~.axes.Axes.quiverkey`.

For more advanced options refer to
:doc:`/gallery/images_contours_and_fields/quiver_demo`.

.. GENERATED FROM PYTHON SOURCE LINES 11-25

.. code-block:: default

    import matplotlib.pyplot as plt
    import numpy as np

    X = np.arange(-10, 10, 1)
    Y = np.arange(-10, 10, 1)
    U, V = np.meshgrid(X, Y)

    fig, ax = plt.subplots()
    q = ax.quiver(X, Y, U, V)
    ax.quiverkey(q, X=0.3, Y=1.1, U=10,
                 label='Quiver key, length = 10', labelpos='E')

    plt.show()




.. image:: /gallery/images_contours_and_fields/images/sphx_glr_quiver_simple_demo_001.png
    :alt: quiver simple demo
    :class: sphx-glr-single-img





.. GENERATED FROM PYTHON SOURCE LINES 26-32

------------

References
""""""""""

The use of the following functions and methods is shown in this example:

.. GENERATED FROM PYTHON SOURCE LINES 33-39

.. code-block:: default


    import matplotlib
    matplotlib.axes.Axes.quiver
    matplotlib.pyplot.quiver
    matplotlib.axes.Axes.quiverkey
    matplotlib.pyplot.quiverkey




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

 Out:

 .. code-block:: none


    <function quiverkey at 0x7f73be829160>




.. _sphx_glr_download_gallery_images_contours_and_fields_quiver_simple_demo.py:


.. only :: html

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



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

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



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

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


.. only:: html

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

    Keywords: matplotlib code example, codex, python plot, pyplot
    `Gallery generated by Sphinx-Gallery
    <https://sphinx-gallery.readthedocs.io>`_
