8000 doc changes in add_subplot and add_axes · matplotlib/matplotlib@a4a55cf · GitHub
[go: up one dir, main page]

Skip to content

Commit a4a55cf

Browse files
committed
doc changes in add_subplot and add_axes
1 parent af7a74b commit a4a55cf

File tree

4 files changed

+408
-221
lines changed

4 files changed

+408
-221
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 26 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -419,54 +419,34 @@ def __init__(self, fig, rect,
419419
**kwargs
420420
):
421421
"""
422-
Build an :class:`Axes` instance in
423-
:class:`~matplotlib.figure.Figure` *fig* with
424-
*rect=[left, bottom, width, height]* in
425-
:class:`~matplotlib.figure.Figure` coordinates
422+
Build an axes in a figure.
426423
427-
Optional keyword arguments:
424+
Parameters
425+
----------
426+
fig : `~matplotlib.figure.Figure`
427+
The axes is build in the `.Figure` *fig*.
428+
429+
rect : [left, bottom, width, height]
430+
The axes is build in the rectangle *rect*. *rect* is in
431+
`.Figure` coordinates.
432+
433+
sharex, sharey : `~.axes.Axes`, optional
434+
The x or y `~.matlotlib.axis` is shared with the x or
435+
y axis in the input `~.axes.Axes`.
436+
437+
frameon : bool, optional
438+
True means that the axes frame is visible.
439+
440+
**kwargs
441+
Other optional keyword arguments:
442+
%(Axes)s
443+
444+
Returns
445+
-------
446+
axes : `~.axes.Axes`
447+
The new `~.axes.Axes` object.
448+
"""
428449

429-
================ =========================================
430-
Keyword Description
431-
================ =========================================
432-
*adjustable* [ 'box' | 'datalim' ]
433-
*alpha* float: the alpha transparency (can be None)
434-
*anchor* [ 'C', 'SW', 'S', 'SE', 'E', 'NE', 'N',
435-
'NW', 'W' ]
436-
*aspect* [ 'auto' | 'equal' | aspect_ratio ]
437-
*autoscale_on* bool; whether to autoscale the *viewlim*
438-
*axisbelow* [ bool | 'line' ] draw the grids
439-
and ticks below or above most other artists,
440-
or below lines but above patches
441-
*cursor_props* a (*float*, *color*) tuple
442-
*figure* a :class:`~matplotlib.figure.Figure`
443-
instance
444-
*frame_on* bool; whether to draw the axes frame
445-
*label* the axes label
446-
*navigate* bool
447-
*navigate_mode* [ 'PAN' | 'ZOOM' | None ] the navigation
448-
toolbar button status
449-
*position* [left, bottom, width, height] in
450-
class:`~matplotlib.figure.Figure` coords
451-
*sharex* an class:`~matplotlib.axes.Axes` instance
452-
to share the x-axis with
453-
*sharey* an class:`~matplotlib.axes.Axes` instance
454-
to share the y-axis with
455-
*title* the title string
456-
*visible* bool, whether the axes is visible
457-
*xlabel* the xlabel
458-
*xlim* (*xmin*, *xmax*) view limits
459-
*xscale* [%(scale)s]
460-
*xticklabels* sequence of strings
461-
*xticks* sequence of floats
462-
*ylabel* the ylabel strings
463-
*ylim* (*ymin*, *ymax*) view limits
464-
*yscale* [%(scale)s]
465-
*yticklabels* sequence of strings
466-
*yticks* sequence of floats
467-
================ =========================================
468-
""" % {'scale': ' | '.join(
469-
[repr(x) for x in mscale.get_scale_names()])}
470450
martist.Artist.__init__(self)
471451
if isinstance(rect, mtransforms.Bbox):
472452
self._position = rect

lib/matplotlib/axes/_subplots.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,6 @@ def _picklable_subplot_class_constructor(axes_class):
213213

214214

215215
docstring.interpd.update(Axes=martist.kwdoc(Axes))
216+
docstring.dedent_interpd(Axes.__init__)
217+
216218
docstring.interpd.update(Subplot=martist.kwdoc(Axes))

0 commit comments

Comments
 (0)
0