Skip to content

Commit

Permalink
Merge pull request #11459 from fredrik-1/doc_subplot_axes
Browse files Browse the repository at this point in the history
Doc changes in add_subplot and add_axes
  • Loading branch information
NelleV committed Jun 30, 2018
2 parents 2474b37 + dbc4290 commit 5a22c8b
Show file tree
Hide file tree
Showing 4 changed files with 421 additions and 225 deletions.
70 changes: 24 additions & 46 deletions lib/matplotlib/axes/_base.py
Expand Up @@ -408,8 +408,6 @@ def __str__(self):
return "{0}({1[0]:g},{1[1]:g};{1[2]:g}x{1[3]:g})".format(
type(self).__name__, self._position.bounds)

@docstring.Substitution(scale=' | '.join(
[repr(x) for x in mscale.get_scale_names()]))
def __init__(self, fig, rect,
facecolor=None, # defaults to rc axes.facecolor
frameon=True,
Expand All @@ -421,52 +419,32 @@ def __init__(self, fig, rect,
**kwargs
):
"""
Build an `~axes.Axes` instance in
`~matplotlib.figure.Figure` *fig* with
*rect=[left, bottom, width, height]* in
`~matplotlib.figure.Figure` coordinates
Build an axes in a figure.
Optional keyword arguments:
Parameters
----------
fig : `~matplotlib.figure.Figure`
The axes is build in the `.Figure` *fig*.
rect : [left, bottom, width, height]
The axes is build in the rectangle *rect*. *rect* is in
`.Figure` coordinates.
sharex, sharey : `~.axes.Axes`, optional
The x or y `~.matplotlib.axis` is shared with the x or
y axis in the input `~.axes.Axes`.
================ =========================================
Keyword Description
================ =========================================
*adjustable* [ 'box' | 'datalim' ]
*alpha* float: the alpha transparency (can be None)
*anchor* [ 'C', 'SW', 'S', 'SE', 'E', 'NE', 'N',
'NW', 'W' ]
*aspect* [ 'auto' | 'equal' | aspect_ratio ]
*autoscale_on* bool; whether to autoscale the *viewlim*
*axisbelow* [ bool | 'line' ] draw the grids
and ticks below or above most other artists,
or below lines but above patches
*cursor_props* a (*float*, *color*) tuple
*figure* a :class:`~matplotlib.figure.Figure`
instance
*frame_on* bool; whether to draw the axes frame
*label* the axes label
*navigate* bool
*navigate_mode* [ 'PAN' | 'ZOOM' | None ] the navigation
toolbar button status
*position* [left, bottom, width, height] in
class:`~matplotlib.figure.Figure` coords
*sharex* an class:`~matplotlib.axes.Axes` instance
to share the x-axis with
*sharey* an class:`~matplotlib.axes.Axes` instance
to share the y-axis with
*title* the title string
*visible* bool, whether the axes is visible
*xlabel* the xlabel
*xlim* (*xmin*, *xmax*) view limits
*xscale* [%(scale)s]
*xticklabels* sequence of strings
*xticks* sequence of floats
*ylabel* the ylabel strings
*ylim* (*ymin*, *ymax*) view limits
*yscale* [%(scale)s]
*yticklabels* sequence of strings
*yticks* sequence of floats
================ =========================================
frameon : bool, optional
True means that the axes frame is visible.
**kwargs
Other optional keyword arguments:
%(Axes)s
Returns
-------
axes : `~.axes.Axes`
The new `~.axes.Axes` object.
"""

martist.Artist.__init__(self)
Expand Down
2 changes: 2 additions & 0 deletions lib/matplotlib/axes/_subplots.py
Expand Up @@ -215,4 +215,6 @@ def _picklable_subplot_class_constructor(axes_class):


docstring.interpd.update(Axes=martist.kwdoc(Axes))
docstring.dedent_interpd(Axes.__init__)

docstring.interpd.update(Subplot=martist.kwdoc(Axes))

0 comments on commit 5a22c8b

Please sign in to comment.