Skip to content

Commit

Permalink
Broken cartopy links in docs (#4464)
Browse files Browse the repository at this point in the history
* Fix cartopy links

* Other broken cartopy links

* Updated whatsnew
  • Loading branch information
wjbenfold authored Jan 5, 2022
1 parent 4875de6 commit f47fb97
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
6 changes: 3 additions & 3 deletions docs/src/userguide/plotting_a_cube.rst
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,16 @@ 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
things.

.. seealso::

:meth:`cartopy's gridlines() <cartopy.mpl.GeoAxes.gridlines>`,
:meth:`cartopy's coastlines() <cartopy.mpl.GeoAxes.coastlines>`.
:meth:`cartopy's gridlines() <cartopy.mpl.geoaxes.GeoAxes.gridlines>`,
:meth:`cartopy's coastlines() <cartopy.mpl.geoaxes.GeoAxes.coastlines>`.


Cube Contour
Expand Down
7 changes: 5 additions & 2 deletions docs/src/whatsnew/latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
<loading_iris_cubes>`. (: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 <loading_iris_cubes>`. (:pull:`4462`)

#. `@bjlittle`_ migrated readthedocs to use mambaforge for `faster documentation building`_.
(:pull:`4476`)
Expand Down
14 changes: 8 additions & 6 deletions lib/iris/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 (
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f47fb97

Please sign in to comment.