Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken cartopy links in docs #4464

Merged
merged 4 commits into from
Jan 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`)


💼 Internal
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