diff --git a/docs/src/userguide/plotting_a_cube.rst b/docs/src/userguide/plotting_a_cube.rst index e2075a6107..cfb3445d9b 100644 --- a/docs/src/userguide/plotting_a_cube.rst +++ b/docs/src/userguide/plotting_a_cube.rst @@ -217,7 +217,7 @@ Plotting 2-Dimensional Cubes Creating Maps ------------- Whenever a 2D plot is created using an :class:`iris.coord_systems.CoordSystem`, -a cartopy :class:`~cartopy.mpl.GeoAxes` instance is created, which can be +a cartopy :class:`~cartopy.mpl.geoaxes.GeoAxes` instance is created, which can be accessed with the :func:`matplotlib.pyplot.gca` function. Given the current map, you can draw gridlines and coastlines amongst other @@ -225,8 +225,8 @@ things. .. seealso:: - :meth:`cartopy's gridlines() `, - :meth:`cartopy's coastlines() `. + :meth:`cartopy's gridlines() `, + :meth:`cartopy's coastlines() `. Cube Contour diff --git a/docs/src/whatsnew/latest.rst b/docs/src/whatsnew/latest.rst index a2c793a86f..45e98f94da 100644 --- a/docs/src/whatsnew/latest.rst +++ b/docs/src/whatsnew/latest.rst @@ -197,8 +197,11 @@ This document explains the changes made to Iris for this release #. `@trexfeathers`_ encouraged contributors to include type hinting in code they are working on - :ref:`code_formatting`. (:pull:`4390`) -#. `@wjbenfold`_ clarified behaviour of :func:`iris.load` in :ref:`userguide loading section - `. (:pull:`4462`) +#. `@wjbenfold`_ updated Cartopy documentation links to point to the renamed + :class:`cartopy.mpl.geoaxes.GeoAxes`. (:pull:`4464`) + +#. `@wjbenfold`_ clarified behaviour of :func:`iris.load` in :ref:`userguide + loading section `. (:pull:`4462`) 💼 Internal diff --git a/lib/iris/plot.py b/lib/iris/plot.py index 1db60d0fae..0e9645c783 100644 --- a/lib/iris/plot.py +++ b/lib/iris/plot.py @@ -858,9 +858,9 @@ def _replace_axes_with_cartopy_axes(cartopy_proj): def _ensure_cartopy_axes_and_determine_kwargs(x_coord, y_coord, kwargs): """ - Replace the current non-cartopy axes with :class:`cartopy.mpl.GeoAxes` - and return the appropriate kwargs dict based on the provided coordinates - and kwargs. + Replace the current non-cartopy axes with + :class:`cartopy.mpl.geoaxes.GeoAxes` and return the appropriate kwargs dict + based on the provided coordinates and kwargs. """ # Determine projection. @@ -874,7 +874,7 @@ def _ensure_cartopy_axes_and_determine_kwargs(x_coord, y_coord, kwargs): else: cartopy_proj = ccrs.PlateCarree() - # Ensure the current axes are a cartopy.mpl.GeoAxes instance. + # Ensure the current axes are a cartopy.mpl.geoaxes.GeoAxes instance. axes = kwargs.get("axes") if axes is None: if ( @@ -1430,7 +1430,8 @@ def barbs(u_cube, v_cube, *args, **kwargs): :func:`iris.analysis.cartography.rotate_grid_vectors`. To transform coordinate grid points, you will need to create 2-dimensional arrays of x and y values. These can be transformed with - :meth:`cartopy.crs.CRS.transform_points`. + the :meth:`~cartopy.crs.CRS.transform_points` method of + :class:`cartopy.crs.CRS`. Kwargs: @@ -1478,7 +1479,8 @@ def quiver(u_cube, v_cube, *args, **kwargs): :func:`iris.analysis.cartography.rotate_grid_vectors`. To transform coordinate grid points, you will need to create 2-dimensional arrays of x and y values. These can be transformed with - :meth:`cartopy.crs.CRS.transform_points`. + the :meth:`~cartopy.crs.CRS.transform_points` method of + :class:`cartopy.crs.CRS`. Kwargs: