Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1242b17

Browse files
committed
doc changes in add_subplot and add_axes
1 parent 160d9f5 commit 1242b17

File tree

4 files changed

+417
-222
lines changed

4 files changed

+417
-222
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 24 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -421,52 +421,32 @@ def __init__(self, fig, rect,
421421
**kwargs
422422
):
423423
"""
424-
Build an `~axes.Axes` instance in
425-
`~matplotlib.figure.Figure` *fig* with
426-
*rect=[left, bottom, width, height]* in
427-
`~matplotlib.figure.Figure` coordinates
424+
Build an axes in a figure.
428425
429-
Optional keyword arguments:
426+
Parameters
427+
----------
428+
fig : `~matplotlib.figure.Figure`
429+
The axes is build in the `.Figure` *fig*.
430+
431+
rect : [left, bottom, width, height]
432+
The axes is build in the rectangle *rect*. *rect* is in
433+
`.Figure` coordinates.
434+
435+
sharex, sharey : `~.axes.Axes`, optional
436+
The x or y `~.matlotlib.axis` is shared with the x or
437+
y axis in the input `~.axes.Axes`.
430438
431-
================ =========================================
432-
Keyword Description
433-
================ =========================================
434-
*adjustable* [ 'box' | 'datalim' ]
435-
*alpha* float: the alpha transparency (can be None)
436-
*anchor* [ 'C', 'SW', 'S', 'SE', 'E', 'NE', 'N',
437-
'NW', 'W' ]
438-
*aspect* [ 'auto' | 'equal' | aspect_ratio ]
439-
*autoscale_on* bool; whether to autoscale the *viewlim*
440-
*axisbelow* [ bool | 'line' ] draw the grids
441-
and ticks below or above most other artists,
442-
or below lines but above patches
443-
*cursor_props* a (*float*, *color*) tuple
444-
*figure* a :class:`~matplotlib.figure.Figure`
445-
instance
446-
*frame_on* bool; whether to draw the axes frame
447-
*label* the axes label
448-
*navigate* bool
449-
*navigate_mode* [ 'PAN' | 'ZOOM' | None ] the navigation
450-
toolbar button status
451-
*position* [left, bottom, width, height] in
452-
class:`~matplotlib.figure.Figure` coords
453-
*sharex* an class:`~matplotlib.axes.Axes` instance
454-
to share the x-axis with
455-
*sharey* an class:`~matplotlib.axes.Axes` instance
456-
to share the y-axis with
457-
*title* the title string
458-
*visible* bool, whether the axes is visible
459-
*xlabel* the xlabel
460-
*xlim* (*xmin*, *xmax*) view limits
461-
*xscale* [%(scale)s]
462-
*xticklabels* sequence of strings
463-
*xticks* sequence of floats
464-
*ylabel* the ylabel strings
465-
*ylim* (*ymin*, *ymax*) view limits
466-
*yscale* [%(scale)s]
467-
*yticklabels* sequence of strings
468-
*yticks* sequence of floats
469-
================ =========================================
439+
frameon : bool, optional
440+
True means that the axes frame is visible.
441+
442+
**kwargs
443+
Other optional keyword arguments:
444+
%(Axes)s
445+
446+
Returns
447+
-------
448+
axes : `~.axes.Axes`
449+
The new `~.axes.Axes` object.
470450
"""
471451

472452
martist.Artist.__init__(self)

lib/matplotlib/axes/_subplots.py

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

216216

217217
docstring.interpd.update(Axes=martist.kwdoc(Axes))
218+
docstring.dedent_interpd(Axes.__init__)
219+
218220
docstring.interpd.update(Subplot=martist.kwdoc(Axes))

0 commit comments

Comments
 (0)