Version 3.1.2
matplotlib

Related Topics

Geographic ProjectionsΒΆ

This shows 4 possible projections using subplot. Matplotlib also supports Basemaps Toolkit and Cartopy for geographic projections.

======================
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.

"""

import matplotlib.pyplot as plt
Traceback (most recent call last):
  File "/build/matplotlib-tq5J6U/matplotlib-3.1.2/examples/subplots_axes_and_figures/geo_demo.py", line 1
    ======================
    ^
SyntaxError: invalid syntax
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()

Keywords: matplotlib code example, codex, python plot, pyplot Gallery generated by Sphinx-Gallery