.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/subplots_axes_and_figures/geo_demo.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. meta:: :keywords: codex .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_subplots_axes_and_figures_geo_demo.py: ====================== Geographic Projections ====================== This shows 4 possible geographic projections. Cartopy_ supports more projections. .. _Cartopy: https://scitools.org.uk/cartopy/ .. GENERATED FROM PYTHON SOURCE LINES 11-14 .. code-block:: Python import matplotlib.pyplot as plt .. GENERATED FROM PYTHON SOURCE LINES 15-21 .. code-block:: Python plt.figure() plt.subplot(projection="aitoff") plt.title("Aitoff") plt.grid(True) .. image-sg:: /gallery/subplots_axes_and_figures/images/sphx_glr_geo_demo_001.png :alt: Aitoff :srcset: /gallery/subplots_axes_and_figures/images/sphx_glr_geo_demo_001.png, /gallery/subplots_axes_and_figures/images/sphx_glr_geo_demo_001_2_00x.png 2.00x :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 22-28 .. code-block:: Python plt.figure() plt.subplot(projection="hammer") plt.title("Hammer") plt.grid(True) .. image-sg:: /gallery/subplots_axes_and_figures/images/sphx_glr_geo_demo_002.png :alt: Hammer :srcset: /gallery/subplots_axes_and_figures/images/sphx_glr_geo_demo_002.png, /gallery/subplots_axes_and_figures/images/sphx_glr_geo_demo_002_2_00x.png 2.00x :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 29-35 .. code-block:: Python plt.figure() plt.subplot(projection="lambert") plt.title("Lambert") plt.grid(True) .. image-sg:: /gallery/subplots_axes_and_figures/images/sphx_glr_geo_demo_003.png :alt: Lambert :srcset: /gallery/subplots_axes_and_figures/images/sphx_glr_geo_demo_003.png, /gallery/subplots_axes_and_figures/images/sphx_glr_geo_demo_003_2_00x.png 2.00x :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 36-43 .. code-block:: Python plt.figure() plt.subplot(projection="mollweide") plt.title("Mollweide") plt.grid(True) plt.show() .. image-sg:: /gallery/subplots_axes_and_figures/images/sphx_glr_geo_demo_004.png :alt: Mollweide :srcset: /gallery/subplots_axes_and_figures/images/sphx_glr_geo_demo_004.png, /gallery/subplots_axes_and_figures/images/sphx_glr_geo_demo_004_2_00x.png 2.00x :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.516 seconds) .. _sphx_glr_download_gallery_subplots_axes_and_figures_geo_demo.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: geo_demo.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: geo_demo.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_