.. _sphx_glr_gallery_subplots_axes_and_figures:
.. _subplots_axes_and_figures_examples:
Subplots, axes and figures
==========================
.. raw:: html
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_align_labels_demo_thumb.png
:alt: Aligning Labels
:ref:`sphx_glr_gallery_subplots_axes_and_figures_align_labels_demo.py`
.. raw:: html
Aligning Labels
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_axes_box_aspect_thumb.png
:alt: Axes box aspect
:ref:`sphx_glr_gallery_subplots_axes_and_figures_axes_box_aspect.py`
.. raw:: html
Axes box aspect
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_axes_demo_thumb.png
:alt: Axes Demo
:ref:`sphx_glr_gallery_subplots_axes_and_figures_axes_demo.py`
.. raw:: html
Axes Demo
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_axes_margins_thumb.png
:alt: Controlling view limits using margins and sticky_edges
:ref:`sphx_glr_gallery_subplots_axes_and_figures_axes_margins.py`
.. raw:: html
Controlling view limits using margins and sticky_edges
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_axes_props_thumb.png
:alt: Axes Props
:ref:`sphx_glr_gallery_subplots_axes_and_figures_axes_props.py`
.. raw:: html
Axes Props
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_axes_zoom_effect_thumb.png
:alt: Axes Zoom Effect
:ref:`sphx_glr_gallery_subplots_axes_and_figures_axes_zoom_effect.py`
.. raw:: html
Axes Zoom Effect
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_axhspan_demo_thumb.png
:alt: axhspan Demo
:ref:`sphx_glr_gallery_subplots_axes_and_figures_axhspan_demo.py`
.. raw:: html
axhspan Demo
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_axis_equal_demo_thumb.png
:alt: Equal axis aspect ratio
:ref:`sphx_glr_gallery_subplots_axes_and_figures_axis_equal_demo.py`
.. raw:: html
Equal axis aspect ratio
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_axis_labels_demo_thumb.png
:alt: Axis Label Position
:ref:`sphx_glr_gallery_subplots_axes_and_figures_axis_labels_demo.py`
.. raw:: html
Axis Label Position
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_broken_axis_thumb.png
:alt: Broken Axis
:ref:`sphx_glr_gallery_subplots_axes_and_figures_broken_axis.py`
.. raw:: html
Broken Axis
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_colorbar_placement_thumb.png
:alt: Placing Colorbars
:ref:`sphx_glr_gallery_subplots_axes_and_figures_colorbar_placement.py`
.. raw:: html
Placing Colorbars
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_custom_figure_class_thumb.png
:alt: Custom Figure subclasses
:ref:`sphx_glr_gallery_subplots_axes_and_figures_custom_figure_class.py`
.. raw:: html
Custom Figure subclasses
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_demo_constrained_layout_thumb.png
:alt: Resizing axes with constrained layout
:ref:`sphx_glr_gallery_subplots_axes_and_figures_demo_constrained_layout.py`
.. raw:: html
Resizing axes with constrained layout
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_demo_tight_layout_thumb.png
:alt: Resizing axes with tight layout
:ref:`sphx_glr_gallery_subplots_axes_and_figures_demo_tight_layout.py`
.. raw:: html
Resizing axes with tight layout
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_fahrenheit_celsius_scales_thumb.png
:alt: Different scales on the same axes
:ref:`sphx_glr_gallery_subplots_axes_and_figures_fahrenheit_celsius_scales.py`
.. raw:: html
Different scales on the same axes
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_figure_size_units_thumb.png
:alt: Figure size in different units
:ref:`sphx_glr_gallery_subplots_axes_and_figures_figure_size_units.py`
.. raw:: html
Figure size in different units
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_figure_title_thumb.png
:alt: Figure labels: suptitle, supxlabel, supylabel
:ref:`sphx_glr_gallery_subplots_axes_and_figures_figure_title.py`
.. raw:: html
Figure labels: suptitle, supxlabel, supylabel
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_ganged_plots_thumb.png
:alt: Creating adjacent subplots
:ref:`sphx_glr_gallery_subplots_axes_and_figures_ganged_plots.py`
.. raw:: html
Creating adjacent subplots
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_geo_demo_thumb.png
:alt: Geographic Projections
:ref:`sphx_glr_gallery_subplots_axes_and_figures_geo_demo.py`
.. raw:: html
Geographic Projections
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_gridspec_and_subplots_thumb.png
:alt: Combining two subplots using subplots and GridSpec
:ref:`sphx_glr_gallery_subplots_axes_and_figures_gridspec_and_subplots.py`
.. raw:: html
Combining two subplots using subplots and GridSpec
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_gridspec_multicolumn_thumb.png
:alt: Using Gridspec to make multi-column/row subplot layouts
:ref:`sphx_glr_gallery_subplots_axes_and_figures_gridspec_multicolumn.py`
.. raw:: html
Using Gridspec to make multi-column/row subplot layouts
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_gridspec_nested_thumb.png
:alt: Nested Gridspecs
:ref:`sphx_glr_gallery_subplots_axes_and_figures_gridspec_nested.py`
.. raw:: html
Nested Gridspecs
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_invert_axes_thumb.png
:alt: Invert Axes
:ref:`sphx_glr_gallery_subplots_axes_and_figures_invert_axes.py`
.. raw:: html
Invert Axes
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_multiple_figs_demo_thumb.png
:alt: Managing multiple figures in pyplot
:ref:`sphx_glr_gallery_subplots_axes_and_figures_multiple_figs_demo.py`
.. raw:: html
Managing multiple figures in pyplot
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_secondary_axis_thumb.png
:alt: Secondary Axis
:ref:`sphx_glr_gallery_subplots_axes_and_figures_secondary_axis.py`
.. raw:: html
Secondary Axis
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_share_axis_lims_views_thumb.png
:alt: Sharing axis limits and views
:ref:`sphx_glr_gallery_subplots_axes_and_figures_share_axis_lims_views.py`
.. raw:: html
Sharing axis limits and views
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_shared_axis_demo_thumb.png
:alt: Shared Axis
:ref:`sphx_glr_gallery_subplots_axes_and_figures_shared_axis_demo.py`
.. raw:: html
Shared Axis
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_subfigures_thumb.png
:alt: Figure subfigures
:ref:`sphx_glr_gallery_subplots_axes_and_figures_subfigures.py`
.. raw:: html
Figure subfigures
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_subplot_thumb.png
:alt: Multiple subplots
:ref:`sphx_glr_gallery_subplots_axes_and_figures_subplot.py`
.. raw:: html
Multiple subplots
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_subplots_adjust_thumb.png
:alt: Subplots spacings and margins
:ref:`sphx_glr_gallery_subplots_axes_and_figures_subplots_adjust.py`
.. raw:: html
Subplots spacings and margins
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_subplots_demo_thumb.png
:alt: Creating multiple subplots using ``plt.subplots``
:ref:`sphx_glr_gallery_subplots_axes_and_figures_subplots_demo.py`
.. raw:: html
Creating multiple subplots using ``plt.subplots``
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_two_scales_thumb.png
:alt: Plots with different scales
:ref:`sphx_glr_gallery_subplots_axes_and_figures_two_scales.py`
.. raw:: html
Plots with different scales
.. raw:: html
.. only:: html
.. image:: /gallery/subplots_axes_and_figures/images/thumb/sphx_glr_zoom_inset_axes_thumb.png
:alt: Zoom region inset axes
:ref:`sphx_glr_gallery_subplots_axes_and_figures_zoom_inset_axes.py`
.. raw:: html
Zoom region inset axes
.. raw:: html
.. toctree::
:hidden:
/gallery/subplots_axes_and_figures/align_labels_demo
/gallery/subplots_axes_and_figures/axes_box_aspect
/gallery/subplots_axes_and_figures/axes_demo
/gallery/subplots_axes_and_figures/axes_margins
/gallery/subplots_axes_and_figures/axes_props
/gallery/subplots_axes_and_figures/axes_zoom_effect
/gallery/subplots_axes_and_figures/axhspan_demo
/gallery/subplots_axes_and_figures/axis_equal_demo
/gallery/subplots_axes_and_figures/axis_labels_demo
/gallery/subplots_axes_and_figures/broken_axis
/gallery/subplots_axes_and_figures/colorbar_placement
/gallery/subplots_axes_and_figures/custom_figure_class
/gallery/subplots_axes_and_figures/demo_constrained_layout
/gallery/subplots_axes_and_figures/demo_tight_layout
/gallery/subplots_axes_and_figures/fahrenheit_celsius_scales
/gallery/subplots_axes_and_figures/figure_size_units
/gallery/subplots_axes_and_figures/figure_title
/gallery/subplots_axes_and_figures/ganged_plots
/gallery/subplots_axes_and_figures/geo_demo
/gallery/subplots_axes_and_figures/gridspec_and_subplots
/gallery/subplots_axes_and_figures/gridspec_multicolumn
/gallery/subplots_axes_and_figures/gridspec_nested
/gallery/subplots_axes_and_figures/invert_axes
/gallery/subplots_axes_and_figures/multiple_figs_demo
/gallery/subplots_axes_and_figures/secondary_axis
/gallery/subplots_axes_and_figures/share_axis_lims_views
/gallery/subplots_axes_and_figures/shared_axis_demo
/gallery/subplots_axes_and_figures/subfigures
/gallery/subplots_axes_and_figures/subplot
/gallery/subplots_axes_and_figures/subplots_adjust
/gallery/subplots_axes_and_figures/subplots_demo
/gallery/subplots_axes_and_figures/two_scales
/gallery/subplots_axes_and_figures/zoom_inset_axes