

.. _sphx_glr_gallery_pylab_examples_geo_demo.py:


======================
Geographic Projections
======================

This shows 4 possible projections using subplot.  Matplotlib also
supports `Basemaps Toolkit <https://matplotlib.org/basemap>`_ and
`Cartopy <http://scitools.org.uk/cartopy>`_ for geographic projections.





.. rst-class:: sphx-glr-horizontal


    *

      .. image:: /gallery/pylab_examples/images/sphx_glr_geo_demo_001.png
            :scale: 47

    *

      .. image:: /gallery/pylab_examples/images/sphx_glr_geo_demo_002.png
            :scale: 47

    *

      .. image:: /gallery/pylab_examples/images/sphx_glr_geo_demo_003.png
            :scale: 47

    *

      .. image:: /gallery/pylab_examples/images/sphx_glr_geo_demo_004.png
            :scale: 47





.. code-block:: python


    import matplotlib.pyplot as plt

    plt.figure()
    plt.subplot(111, projection="aitoff")
    plt.title("Aitoff")
    plt.grid(True)

    plt.figure()
    plt.subplot(111, projection="hammer")
    plt.title("Hammer")
    plt.grid(True)

    plt.figure()
    plt.subplot(111, projection="lambert")
    plt.title("Lambert")
    plt.grid(True)

    plt.figure()
    plt.subplot(111, projection="mollweide")
    plt.title("Mollweide")
    plt.grid(True)

    plt.show()

**Total running time of the script:** ( 0 minutes  0.122 seconds)



.. container:: sphx-glr-footer


  .. container:: sphx-glr-download

     :download:`Download Python source code: geo_demo.py <geo_demo.py>`



  .. container:: sphx-glr-download

     :download:`Download Jupyter notebook: geo_demo.ipynb <geo_demo.ipynb>`

.. rst-class:: sphx-glr-signature

    `Generated by Sphinx-Gallery <https://sphinx-gallery.readthedocs.io>`_
