From 90f239787290dd94df295ef0f05be9daefe28533 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Tue, 20 Aug 2019 10:56:22 +0200 Subject: [PATCH] Fix more doc references. Again fixing some broken some references from a PR that was CI'd before the missing-references.json PR. Here I just added proper reference targets for the mpl_toolkits.{axes_grid1,axisartis} modules. --- doc/api/next_api_changes/2018-02-10-AL.rst | 8 ++++---- doc/api/toolkits/axes_grid1.rst | 6 ++---- doc/api/toolkits/axisartist.rst | 2 +- doc/api/toolkits/index.rst | 12 ------------ examples/axes_grid1/simple_anchored_artists.py | 2 +- examples/axisartist/demo_parasite_axes.py | 4 ++-- examples/misc/anchored_artists.py | 2 +- tutorials/intermediate/tight_layout_guide.py | 2 +- 8 files changed, 12 insertions(+), 26 deletions(-) diff --git a/doc/api/next_api_changes/2018-02-10-AL.rst b/doc/api/next_api_changes/2018-02-10-AL.rst index b9c55d3684a4..2f56c28ff715 100644 --- a/doc/api/next_api_changes/2018-02-10-AL.rst +++ b/doc/api/next_api_changes/2018-02-10-AL.rst @@ -16,10 +16,10 @@ The main differences are: ``colorbar.yaxis`` depending on the orientation, rather than ``colorbar.cbar_axis``. - Overdrawing multiple colorbars on top of one another in a single Axes (e.g. - when using the ``cax`` attribute of `ImageGrid` elements) is not supported; - if you previously relied on the second colorbar being drawn over the first, - you can call ``cax.cla()`` to clear the axes before drawing the second - colorbar. + when using the ``cax`` attribute of `~.axes_grid1.axes_grid.ImageGrid` + elements) is not supported; if you previously relied on the second colorbar + being drawn over the first, you can call ``cax.cla()`` to clear the axes + before drawing the second colorbar. During the deprecation period, the ``mpl_toolkits.legacy_colorbar`` rcParam can be set to True to use ``mpl_toolkits.axes_grid1.colorbar`` in diff --git a/doc/api/toolkits/axes_grid1.rst b/doc/api/toolkits/axes_grid1.rst index 52363877e285..0570e762b3f5 100644 --- a/doc/api/toolkits/axes_grid1.rst +++ b/doc/api/toolkits/axes_grid1.rst @@ -1,9 +1,9 @@ -.. _toolkit_axesgrid1-index: +.. module:: mpl_toolkits.axes_grid1 Matplotlib axes_grid1 Toolkit ============================= -The matplotlib :class:`mpl_toolkits.axes_grid1` toolkit is a collection of +The matplotlib :mod:`mpl_toolkits.axes_grid1` toolkit is a collection of helper classes to ease displaying multiple images in matplotlib. While the aspect parameter in matplotlib adjust the position of the single axes, axes_grid1 toolkit provides a framework to adjust the position of @@ -16,8 +16,6 @@ See :ref:`axes_grid1_users-guide-index` for a guide on the usage of axes_grid1. :align: center :scale: 50 - - .. currentmodule:: mpl_toolkits **The submodules of the axes_grid1 API are:** diff --git a/doc/api/toolkits/axisartist.rst b/doc/api/toolkits/axisartist.rst index a08113f71396..f18246fef128 100644 --- a/doc/api/toolkits/axisartist.rst +++ b/doc/api/toolkits/axisartist.rst @@ -1,4 +1,4 @@ -.. _toolkit_axisartist-index: +.. module:: mpl_toolkits.axisartist Matplotlib axisartist Toolkit ============================= diff --git a/doc/api/toolkits/index.rst b/doc/api/toolkits/index.rst index 2089156a1d21..8a4ed3ed78ca 100644 --- a/doc/api/toolkits/index.rst +++ b/doc/api/toolkits/index.rst @@ -6,12 +6,9 @@ Toolkits ######## - - Toolkits are collections of application-specific functions that extend Matplotlib. - .. _toolkit_mplot3d: mplot3d @@ -41,20 +38,11 @@ Links ----- * mpl3d API: :ref:`toolkit_mplot3d-api` -.. _toolkit_axes_grid1_incl: - .. include:: axes_grid1.rst :start-line: 1 -.. _toolkit_axisartist_incl: - .. include:: axisartist.rst :start-line: 1 -.. _toolkit_axes_grid_incl: - .. include:: axes_grid.rst :start-line: 1 - - - diff --git a/examples/axes_grid1/simple_anchored_artists.py b/examples/axes_grid1/simple_anchored_artists.py index 9a8ae92335e9..343d8d3aaa13 100644 --- a/examples/axes_grid1/simple_anchored_artists.py +++ b/examples/axes_grid1/simple_anchored_artists.py @@ -4,7 +4,7 @@ ======================= This example illustrates the use of the anchored helper classes found in -:py:mod:`~matplotlib.offsetbox` and in the :ref:`toolkit_axesgrid1-index`. +:mod:`matplotlib.offsetbox` and in :mod:`mpl_toolkits.axes_grid1`. An implementation of a similar figure, but without use of the toolkit, can be found in :doc:`/gallery/misc/anchored_artists`. """ diff --git a/examples/axisartist/demo_parasite_axes.py b/examples/axisartist/demo_parasite_axes.py index 5c877c8d0811..a9fe6356340d 100644 --- a/examples/axisartist/demo_parasite_axes.py +++ b/examples/axisartist/demo_parasite_axes.py @@ -12,8 +12,8 @@ An alternative approach using standard Matplotlib subplots is shown in the :doc:`/gallery/ticks_and_spines/multiple_yaxis_with_spines` example. -An alternative approach using the :ref:`toolkit_axesgrid1-index` -and :ref:`toolkit_axisartist-index` is found in the +An alternative approach using :mod:`mpl_toolkits.axes_grid1` +and :mod:`mpl_toolkits.axisartist` is found in the :doc:`/gallery/axisartist/demo_parasite_axes2` example. """ diff --git a/examples/misc/anchored_artists.py b/examples/misc/anchored_artists.py index cd829f80fb25..922993184796 100644 --- a/examples/misc/anchored_artists.py +++ b/examples/misc/anchored_artists.py @@ -4,7 +4,7 @@ ================ This example illustrates the use of the anchored objects without the -helper classes found in the :ref:`toolkit_axesgrid1-index`. This version +helper classes found in :mod:`mpl_toolkits.axes_grid1`. This version of the figure is similar to the one found in :doc:`/gallery/axes_grid1/simple_anchored_artists`, but it is implemented using only the matplotlib namespace, without the help diff --git a/tutorials/intermediate/tight_layout_guide.py b/tutorials/intermediate/tight_layout_guide.py index 1c1efc694a3b..9c3fead0232e 100644 --- a/tutorials/intermediate/tight_layout_guide.py +++ b/tutorials/intermediate/tight_layout_guide.py @@ -316,7 +316,7 @@ def example_plot(ax, fontsize=12): # Use with AxesGrid1 # ================== # -# While limited, the axes_grid1 toolkit is also supported. +# While limited, :mod:`mpl_toolkits.axes_grid1` is also supported. from mpl_toolkits.axes_grid1 import Grid