8000 Merge pull request #24769 from timhoffm/doc-axes-class · matplotlib/matplotlib@ddf33db · GitHub
[go: up one dir, main page]

Skip to content

Commit ddf33db

Browse files
authored
Merge pull request #24769 from timhoffm/doc-axes-class
Improve matplotlib.axes documentation
2 parents 1d13d2d + 4236f59 commit ddf33db

File tree

3 files changed

+27
-10
lines changed
  • lib/matplotlib/axes
  • 3 files changed

    +27
    -10
    lines changed
    Lines changed: 11 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1,11 @@
    1+
    {{ fullname | escape | underline }}
    2+
    3+
    4+
    .. currentmodule:: {{ module }}
    5+
    6+
    7+
    {% if objtype in ['class'] %}
    8+
    .. auto{{ objtype }}:: {{ objname }}
    9+
    :no-members:
    10+
    11+
    {% endif %}

    doc/api/axes_api.rst

    Lines changed: 10 additions & 9 deletions
    Original file line numberDiff line numberDiff line change
    @@ -2,6 +2,10 @@
    22
    ``matplotlib.axes``
    33
    *******************
    44

    5+
    The `~.axes.Axes` class represents one (sub-)plot in a figure. It contains the
    6+
    plotted data, axis ticks, labels, title, legend, etc. Its methods are the main
    7+
    interface for manipulating the plot.
    8+
    59
    .. currentmodule:: matplotlib.axes
    610

    711
    .. contents:: Table of Contents
    @@ -14,18 +18,15 @@
    1418
    :no-members:
    1519
    :no-undoc-members:
    1620

    17-
    Inheritance
    18-
    ===========
    19-
    .. inheritance-diagram:: matplotlib.axes.Axes
    20-
    :private-bases:
    21-
    2221
    The Axes class
    2322
    ==============
    2423

    25-
    .. autoclass:: Axes
    26-
    :no-members:
    27-
    :no-undoc-members:
    28-
    :show-inheritance:
    24+
    .. autosummary::
    25+
    :toctree: _as_gen
    26+
    :template: autosummary_class_only.rst
    27+
    :nosignatures:
    28+
    29+
    Axes
    2930

    3031
    Plotting
    3132
    ========

    lib/matplotlib/axes/_axes.py

    Lines changed: 6 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -46,10 +46,15 @@
    4646
    @_docstring.interpd
    4747
    class Axes(_AxesBase):
    4848
    """
    49-
    The `Axes` contains most of the figure elements: `~.axis.Axis`,
    49+
    An Axes object encapsulates all the elements of an individual (sub-)plot in
    50+
    a figure.
    51+
    52+
    It contains most of the (sub-)plot elements: `~.axis.Axis`,
    5053
    `~.axis.Tick`, `~.lines.Line2D`, `~.text.Text`, `~.patches.Polygon`, etc.,
    5154
    and sets the coordinate system.
    5255
    56+
    Like all visible elements in a figure, Axes is an `.Artist` subclass.
    57+
    5358
    The `Axes` instance supports callbacks through a callbacks attribute which
    5459
    is a `~.cbook.CallbackRegistry` instance. The events you can connect to
    5560
    are 'xlim_changed' and 'ylim_changed' and the callback will be called with

    0 commit comments

    Comments
     (0)
    0