Skip to content

DOC: Fix non-working code object references #28825

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

Merged
merged 1 commit into from
Sep 24, 2024
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
11 changes: 11 additions & 0 deletions doc/api/axes_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ The Axes class

Axes

Attributes
----------

.. autosummary::
:toctree: _as_gen
:template: autosummary.rst
:nosignatures:

Axes.viewLim
Axes.dataLim

Plotting
========

Expand Down
4 changes: 0 additions & 4 deletions doc/missing-references.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,6 @@
"Artist.stale_callback": [
"doc/users/explain/figure/interactive_guide.rst:323"
],
"Axes.dataLim": [
"doc/api/axes_api.rst:293:<autosummary>:1",
"lib/matplotlib/axes/_base.py:docstring of matplotlib.axes._base._AxesBase.update_datalim:2"
],
"AxesBase": [
"doc/api/axes_api.rst:448:<autosummary>:1",
"lib/matplotlib/axes/_base.py:docstring of matplotlib.axes._base._AxesBase.add_child_axes:2"
Expand Down
7 changes: 0 additions & 7 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,6 @@ class Axes(_AxesBase):
methods instead; e.g. from `.pyplot` or `.Figure`:
`~.pyplot.subplots`, `~.pyplot.subplot_mosaic` or `.Figure.add_axes`.

Attributes
----------
dataLim : `.Bbox`
The bounding box enclosing all data displayed in the Axes.
viewLim : `.Bbox`
The view limits in data coordinates.

"""
### Labelling, legend and texts

Expand Down
6 changes: 5 additions & 1 deletion lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,9 @@ class _AxesBase(martist.Artist):

_subclass_uses_cla = False

dataLim: mtransforms.Bbox
"""The bounding `.Bbox` enclosing all data displayed in the Axes."""
Comment on lines +554 to +555
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a place to put the docstring. IMHO a class-level annotation is the best location (though we normally don't write types in the py files).


@property
def _axis_map(self):
"""A mapping of axis names, e.g. 'x', to `Axis` instances."""
Expand Down Expand Up @@ -849,6 +852,7 @@ def _unstale_viewLim(self):

@property
def viewLim(self):
"""The view limits as `.Bbox` in data coordinates."""
self._unstale_viewLim()
return self._viewLim

Expand Down Expand Up @@ -2265,7 +2269,7 @@ def add_artist(self, a):

def add_child_axes(self, ax):
"""
Add an `.AxesBase` to the Axes' children; return the child Axes.
Add an `.Axes` to the Axes' children; return the child Axes.

This is the lowlevel version. See `.axes.Axes.inset_axes`.
"""
Expand Down
Loading