

.. _sphx_glr_gallery_axes_grid1:

.. _axes_grid_examples:

.. _axes_grid1-examples-index:

Module - axes_grid1
===================



.. raw:: html

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

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Anchored Direction Arrow">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_demo_anchored_direction_arrows_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_demo_anchored_direction_arrows.py`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Axes divider to calculate location of Axes and create a divider for them using existing Axes instances.">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_demo_axes_divider_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_demo_axes_divider.py`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Grid of 2x2 images with a single colorbar or with one colorbar per Axes.">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_demo_axes_grid_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_demo_axes_grid.py`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Grid of images with shared xaxis and yaxis.">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_demo_axes_grid2_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_demo_axes_grid2.py`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Using an HBoxDivider to arrange subplots.">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_demo_axes_hbox_divider_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_demo_axes_hbox_divider.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">HBoxDivider and VBoxDivider demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="RGBAxes creates a layout of 4 Axes for displaying RGB channels: one large Axes for the RGB image and 3 smaller Axes for the R, G, B channels.">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_demo_axes_rgb_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_demo_axes_rgb.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Show RGB channels using RGBAxes</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The axes_divider.make_axes_locatable function takes an existing Axes, adds it to a new AxesDivider and returns the AxesDivider.  The append_axes method of the AxesDivider can then be used to create a new Axes on a given side (&quot;top&quot;, &quot;right&quot;, &quot;bottom&quot;, or &quot;left&quot;) of the original Axes. This example uses append_axes to add colorbars next to Axes.">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_demo_colorbar_with_axes_divider_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_demo_colorbar_with_axes_divider.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Colorbar with AxesDivider</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to control the position, height, and width of colorbars using inset_axes.">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_demo_colorbar_with_inset_locator_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_demo_colorbar_with_inset_locator.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Control the position and size of a colorbar with Inset Axes</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to use one common colorbar for each row or column of an image grid.">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_demo_edge_colorbar_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_demo_edge_colorbar.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Per-row or per-column colorbars</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Note that this can be accomplished with the main library for Axes on Figures that do not change size: fixed_size_axes">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_demo_fixed_size_axes_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_demo_fixed_size_axes.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Axes with a fixed physical size</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="ImageGrid cells with a fixed aspect ratio">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_demo_imagegrid_aspect_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_demo_imagegrid_aspect.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">ImageGrid cells with a fixed aspect ratio</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Inset locator demo">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_inset_locator_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_inset_locator_demo.py`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This demo shows how to create a zoomed inset via zoomed_inset_axes. In the first subplot an AnchoredSizeBar shows the zoom effect. In the second subplot a connection to the region of interest is created via mark_inset.">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_inset_locator_demo2_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_inset_locator_demo2.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Inset locator demo 2</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Make room for ylabel using axes_grid">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_make_room_for_ylabel_using_axesgrid_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_make_room_for_ylabel_using_axesgrid.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Make room for ylabel using axes_grid</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Parasite Simple">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_parasite_simple_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_parasite_simple.py`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Parasite Simple2">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_parasite_simple2_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_parasite_simple2.py`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Show the marginal distributions of a scatter plot as histograms at the sides of the plot.">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_scatter_hist_locatable_axes_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_scatter_hist_locatable_axes.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Align histogram to scatter plot using locatable Axes</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the use of the anchored helper classes found in matplotlib.offsetbox and in mpl_toolkits.axes_grid1. An implementation of a similar figure, but without use of the toolkit, can be found in /gallery/misc/anchored_artists.">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_simple_anchored_artists_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_simple_anchored_artists.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Simple Anchored Artists</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="See also axes_grid.">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_simple_axes_divider1_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_simple_axes_divider1.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Simple Axes Divider 1</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="See also axes_grid.">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_simple_axes_divider3_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_simple_axes_divider3.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Simple axes divider 3</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Align multiple images using ImageGrid.">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_simple_axesgrid_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_simple_axesgrid.py`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Align multiple images of different sizes using ImageGrid.">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_simple_axesgrid2_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_simple_axesgrid2.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Simple ImageGrid 2</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Simple Axisline4">

.. only:: html

  .. image:: /gallery/axes_grid1/images/thumb/sphx_glr_simple_axisline4_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_axes_grid1_simple_axisline4.py`

.. raw:: html

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


.. thumbnail-parent-div-close

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /gallery/axes_grid1/demo_anchored_direction_arrows
   /gallery/axes_grid1/demo_axes_divider
   /gallery/axes_grid1/demo_axes_grid
   /gallery/axes_grid1/demo_axes_grid2
   /gallery/axes_grid1/demo_axes_hbox_divider
   /gallery/axes_grid1/demo_axes_rgb
   /gallery/axes_grid1/demo_colorbar_with_axes_divider
   /gallery/axes_grid1/demo_colorbar_with_inset_locator
   /gallery/axes_grid1/demo_edge_colorbar
   /gallery/axes_grid1/demo_fixed_size_axes
   /gallery/axes_grid1/demo_imagegrid_aspect
   /gallery/axes_grid1/inset_locator_demo
   /gallery/axes_grid1/inset_locator_demo2
   /gallery/axes_grid1/make_room_for_ylabel_using_axesgrid
   /gallery/axes_grid1/parasite_simple
   /gallery/axes_grid1/parasite_simple2
   /gallery/axes_grid1/scatter_hist_locatable_axes
   /gallery/axes_grid1/simple_anchored_artists
   /gallery/axes_grid1/simple_axes_divider1
   /gallery/axes_grid1/simple_axes_divider3
   /gallery/axes_grid1/simple_axesgrid
   /gallery/axes_grid1/simple_axesgrid2
   /gallery/axes_grid1/simple_axisline4

