Version 0.18 (May 3, 2020)
==========================

For a full list of included Pull Requests and closed Issues, please see the
`0.18 milestone <https://github.com/SciTools/cartopy/milestone/25>`_.

Features
--------

* We are very pleased to announce that Greg Lucas has been added to the cartopy
  core development team. Greg (@greglucas) added the NightShade feature in the
  previous release, and has been instrumental in issue and PR triage leading up
  to 0.18. He has also ensured that CI systems have kept working through
  various upstream project changes.

* Kevin Donkers and Phil Elson made the AdaptiveScalar the default for Natural
  Earth Features. This will make the default features look much nicer when
  plotting on zoomed in axes. (:pull:`1105`)

* Elliott Sales de Andrade added support for Matplotlib 3.2 and 3.3
  (:pull:`1425`) and Python 3.7 and 3.8 (:pull:`1428`).

* Alan Snow added the ability to use Proj version 6.x (:pull:`1289`) and
  Elliott Sales de Andrade updated a lot of the tests and build issues for this
  upgrade (:pull:`1417`).

* Andrew Huang added the ability to put the meridian and parallel gridline
  labels on the gridlines within the plot boundaries rather than
  only as labels on the boundary. (:pull:`1089`)

    .. plot::
       :width: 400pt

        import matplotlib.pyplot as plt
        import cartopy.crs as ccrs

        fig = plt.figure(figsize=(10, 5))
        ax = plt.axes(projection=ccrs.PlateCarree())
        ax.set_global()
        ax.stock_img()
        ax.coastlines()
        ax.gridlines(x_inline=True, draw_labels=True)
        plt.show()

* Stephane Raynaud added longitude and latitude labeling to all projections. It
  was previously restricted to the Mercator and PlateCarree projections.
  (:pull:`1117`)

    .. plot::
       :width: 400pt

        import matplotlib.pyplot as plt
        import cartopy.crs as ccrs

        fig = plt.figure(figsize=(10, 5))
        ax = plt.axes(projection=ccrs.InterruptedGoodeHomolosine())
        ax.set_global()
        ax.stock_img()
        ax.coastlines()
        ax.gridlines(draw_labels=True)
        plt.show()

* Phil Elson added the (long awaited!) ability to label contours on GeoAxes. A
  :ref:`sphx_glr_gallery_scalar_data_contour_labels.py` example has been added to the
  gallery demonstrating the new capability. (:pull:`1257`)

  .. figure:: ../gallery/scalar_data/images/sphx_glr_contour_labels_001.png
   :target: ../gallery/scalar_data/contour_labels.html
   :align: center

* Matthew Bradbury added the ability to query `UK Ordnance Survey
  <https://apidocs.os.uk/>`_ image tiles. (:pull:`1214`)

* Phil Elson added the ability to fetch image tiles using multiple
  threads. (:pull:`1232`)

* Elliott Sales de Andrade added a
  :class:`cartopy.mpl.geoaxes.GeoAxes.GeoSpine` class to replace the
  :attr:`cartopy.mpl.geoaxes.GeoAxes.outline_patch` that defines the map
  boundary. (:pull:`1213`)

* Elliott Sales de Andrade improved appearance of plots with tight layout.
  (:pull:`1213` and :pull:`1422`)

* Ryan May fixed the Geostationary projection boundary so that geometries
  no longer extend beyond the map domain. (:pull:`1216`)

* Phil Elson added support for style composition of Features. This means that
  the styles set on a Feature when it is created, and when it is added to an
  Axes, will be processed consistently.

Deprecations
------------
* This will be the last release with Python 2 support.

* The default value for the ``origin`` argument to
  :func:`cartopy.mpl.geoaxes.GeoAxes.imshow` is now ``'upper'`` to match the
  default in Matplotlib.

* The :attr:`cartopy.mpl.geoaxes.GeoAxes.outline_patch` attribute is
  deprecated. In its place, use Matplotlib's standard options for controlling
  the Axes frame, or access ``GeoAxes.spines['geo']`` directly.

* The :attr:`cartopy.mpl.geoaxes.GeoAxes.background_patch` attribute is
  deprecated. In its place, use Matplotlib's standard options for controlling
  the Axes patch, i.e., pass values to the constructor or access
  ``GeoAxes.patch`` directly.

* The gridliner labelling options
  :attr:`cartopy.mpl.gridliner.Gridliner.xlabels_top`,
  :attr:`cartopy.mpl.gridliner.Gridliner.xlabels_bottom`,
  :attr:`cartopy.mpl.gridliner.Gridliner.ylabels_left`, and
  :attr:`cartopy.mpl.gridliner.Gridliner.ylabels_right` are deprecated.
  Instead, use :attr:`cartopy.mpl.gridliner.Gridliner.top_labels`,
  :attr:`cartopy.mpl.gridliner.Gridliner.bottom_labels`,
  :attr:`cartopy.mpl.gridliner.Gridliner.left_labels`, or
  :attr:`cartopy.mpl.gridliner.Gridliner.right_labels`.