From 9c154ef29e7aa963d17592a610e630caf123fd4a Mon Sep 17 00:00:00 2001 From: fredrik-1 Date: Sun, 17 Jun 2018 10:36:50 +0200 Subject: [PATCH] add subplots to axes documentation --- doc/api/axes_api.rst | 18 +++++++++++++++--- doc/api/figure_api.rst | 3 ++- lib/matplotlib/axes/_subplots.py | 12 +++++++----- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/doc/api/axes_api.rst b/doc/api/axes_api.rst index 42f7e23f7074..fad2ea637088 100644 --- a/doc/api/axes_api.rst +++ b/doc/api/axes_api.rst @@ -1,11 +1,13 @@ -================ - ``Axes`` class -================ +==== +axes +==== + .. currentmodule:: matplotlib.axes .. autoclass:: Axes :no-members: :no-undoc-members: + :show-inheritance: .. contents:: Table of Contents :depth: 2 @@ -13,6 +15,16 @@ :backlinks: entry :class: multicol-toc +Subplots +======== + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + SubplotBase + subplot_class_factory Plotting ======== diff --git a/doc/api/figure_api.rst b/doc/api/figure_api.rst index 779f4ad1c1c4..e6fee3334f33 100644 --- a/doc/api/figure_api.rst +++ b/doc/api/figure_api.rst @@ -18,6 +18,7 @@ Classes .. autosummary:: :toctree: _as_gen/ :template: autosummary.rst + :nosignatures: AxesStack Figure @@ -29,6 +30,6 @@ Functions .. autosummary:: :toctree: _as_gen/ :template: autosummary.rst + :nosignatures: figaspect - \ No newline at end of file diff --git a/lib/matplotlib/axes/_subplots.py b/lib/matplotlib/axes/_subplots.py index 257c5711f2de..d0bc0e43a9c7 100644 --- a/lib/matplotlib/axes/_subplots.py +++ b/lib/matplotlib/axes/_subplots.py @@ -187,11 +187,13 @@ def _make_twin_axes(self, *kl, **kwargs): @functools.lru_cache(None) def subplot_class_factory(axes_class=None): - # This makes a new class that inherits from SubplotBase and the - # given axes_class (which is assumed to be a subclass of Axes). - # This is perhaps a little bit roundabout to make a new class on - # the fly like this, but it means that a new Subplot class does - # not have to be created for every type of Axes. + """ + This makes a new class that inherits from `.SubplotBase` and the + given axes_class (which is assumed to be a subclass of `.axes.Axes`). + This is perhaps a little bit roundabout to make a new class on + the fly like this, but it means that a new Subplot class does + not have to be created for every type of Axes. + """ if axes_class is None: axes_class = Axes return type("%sSubplot" % axes_class.__name__,