

.. _sphx_glr_gallery_shapes_and_collections:

.. _shapes_and_collections_examples:


Shapes and collections
======================



.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Adding arrow patches to plots.">

.. only:: html

  .. image:: /gallery/shapes_and_collections/images/thumb/sphx_glr_arrow_guide_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_shapes_and_collections_arrow_guide.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Arrow guide</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example displays several of Matplotlib&#x27;s graphics primitives (artists). A full list of art...">

.. only:: html

  .. image:: /gallery/shapes_and_collections/images/thumb/sphx_glr_artist_reference_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_shapes_and_collections_artist_reference.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Reference for Matplotlib artists</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="For the first two subplots, we will use spirals.  Their size will be set in plot units, not dat...">

.. only:: html

  .. image:: /gallery/shapes_and_collections/images/thumb/sphx_glr_collections_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_shapes_and_collections_collections.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Line, Poly and RegularPoly Collection with autoscaling</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Make a compound path -- in this case two simple polygons, a rectangle and a triangle.  Use CLOS...">

.. only:: html

  .. image:: /gallery/shapes_and_collections/images/thumb/sphx_glr_compound_path_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_shapes_and_collections_compound_path.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Compound path</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to draw, and manipulate shapes given vertices and nodes using the ~.path...">

.. only:: html

  .. image:: /gallery/shapes_and_collections/images/thumb/sphx_glr_dolphin_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_shapes_and_collections_dolphin.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Dolphins</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Draw donuts (miam!) using ~.path.Path\s and ~.patches.PathPatch\es. This example shows the effe...">

.. only:: html

  .. image:: /gallery/shapes_and_collections/images/thumb/sphx_glr_donut_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_shapes_and_collections_donut.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Mmh Donuts!!!</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This demo shows how to draw an ellipse with an orientation arrow (clockwise or counterclockwise...">

.. only:: html

  .. image:: /gallery/shapes_and_collections/images/thumb/sphx_glr_ellipse_arrow_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_shapes_and_collections_ellipse_arrow.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Ellipse with orientation arrow demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Drawing a collection of ellipses. While this would equally be possible using a ~.collections.El...">

.. only:: html

  .. image:: /gallery/shapes_and_collections/images/thumb/sphx_glr_ellipse_collection_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_shapes_and_collections_ellipse_collection.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Ellipse Collection</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Draw many ellipses. Here individual ellipses are drawn. Compare this to the Ellipse collection ...">

.. only:: html

  .. image:: /gallery/shapes_and_collections/images/thumb/sphx_glr_ellipse_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_shapes_and_collections_ellipse_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Ellipse Demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The following examples show how to plot boxes with different visual properties.">

.. only:: html

  .. image:: /gallery/shapes_and_collections/images/thumb/sphx_glr_fancybox_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_shapes_and_collections_fancybox_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Drawing fancy boxes</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Hatches can be added to most polygons in Matplotlib, including ~.Axes.bar, ~.Axes.fill_between,...">

.. only:: html

  .. image:: /gallery/shapes_and_collections/images/thumb/sphx_glr_hatch_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_shapes_and_collections_hatch_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Hatch demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Hatches can be added to most polygons in Matplotlib, including ~.Axes.bar, ~.Axes.fill_between,...">

.. only:: html

  .. image:: /gallery/shapes_and_collections/images/thumb/sphx_glr_hatch_style_reference_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_shapes_and_collections_hatch_style_reference.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Hatch style reference</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Matplotlib can efficiently draw multiple lines at once using a ~.LineCollection, as showcased b...">

.. only:: html

  .. image:: /gallery/shapes_and_collections/images/thumb/sphx_glr_line_collection_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_shapes_and_collections_line_collection.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting multiple lines with a LineCollection</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how to use .collections.PatchCollection.">

.. only:: html

  .. image:: /gallery/shapes_and_collections/images/thumb/sphx_glr_patch_collection_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_shapes_and_collections_patch_collection.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Circles, Wedges and Polygons</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to create ~.path.Path and ~.patches.PathPatch objects through Matplotlib...">

.. only:: html

  .. image:: /gallery/shapes_and_collections/images/thumb/sphx_glr_path_patch_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_shapes_and_collections_path_patch.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">PathPatch object</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example showcases the ~.patches.PathPatch object to create a Bezier polycurve path patch.">

.. only:: html

  .. image:: /gallery/shapes_and_collections/images/thumb/sphx_glr_quad_bezier_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_shapes_and_collections_quad_bezier.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Bezier Curve</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example showcases a simple scatter plot.">

.. only:: html

  .. image:: /gallery/shapes_and_collections/images/thumb/sphx_glr_scatter_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_shapes_and_collections_scatter.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Scatter plot</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /gallery/shapes_and_collections/arrow_guide
   /gallery/shapes_and_collections/artist_reference
   /gallery/shapes_and_collections/collections
   /gallery/shapes_and_collections/compound_path
   /gallery/shapes_and_collections/dolphin
   /gallery/shapes_and_collections/donut
   /gallery/shapes_and_collections/ellipse_arrow
   /gallery/shapes_and_collections/ellipse_collection
   /gallery/shapes_and_collections/ellipse_demo
   /gallery/shapes_and_collections/fancybox_demo
   /gallery/shapes_and_collections/hatch_demo
   /gallery/shapes_and_collections/hatch_style_reference
   /gallery/shapes_and_collections/line_collection
   /gallery/shapes_and_collections/patch_collection
   /gallery/shapes_and_collections/path_patch
   /gallery/shapes_and_collections/quad_bezier
   /gallery/shapes_and_collections/scatter

