.. only:: html
.. note::
:class: sphx-glr-download-link-note
Click :ref:`here ` 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: http://scitools.org.uk/cartopy
.. code-block:: default
import matplotlib.pyplot as plt
.. code-block:: default
plt.figure()
plt.subplot(111, projection="aitoff")
plt.title("Aitoff")
plt.grid(True)
.. image:: /gallery/subplots_axes_and_figures/images/sphx_glr_geo_demo_001.png
:alt: Aitoff
:class: sphx-glr-single-img
.. code-block:: default
plt.figure()
plt.subplot(111, projection="hammer")
plt.title("Hammer")
plt.grid(True)
.. image:: /gallery/subplots_axes_and_figures/images/sphx_glr_geo_demo_002.png
:alt: Hammer
:class: sphx-glr-single-img
.. code-block:: default
plt.figure()
plt.subplot(111, projection="lambert")
plt.title("Lambert")
plt.grid(True)
.. image:: /gallery/subplots_axes_and_figures/images/sphx_glr_geo_demo_003.png
:alt: Lambert
:class: sphx-glr-single-img
.. code-block:: default
plt.figure()
plt.subplot(111, projection="mollweide")
plt.title("Mollweide")
plt.grid(True)
plt.show()
.. image:: /gallery/subplots_axes_and_figures/images/sphx_glr_geo_demo_004.png
:alt: Mollweide
:class: sphx-glr-single-img
.. rst-class:: sphx-glr-timing
**Total running time of the script:** ( 0 minutes 1.619 seconds)
.. _sphx_glr_download_gallery_subplots_axes_and_figures_geo_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: geo_demo.py `
.. container:: sphx-glr-download sphx-glr-download-jupyter
:download:`Download Jupyter notebook: geo_demo.ipynb `
.. only:: html
.. rst-class:: sphx-glr-signature
Keywords: matplotlib code example, codex, python plot, pyplot
`Gallery generated by Sphinx-Gallery
`_