|
From: <jo...@us...> - 2009-08-03 19:41:43
|
Revision: 7338
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7338&view=rev
Author: jouni
Date: 2009-08-03 19:41:32 +0000 (Mon, 03 Aug 2009)
Log Message:
-----------
Fixed boilerplate.py so it doesn't break the ReST docs.
Modified Paths:
--------------
branches/v0_99_maint/CHANGELOG
branches/v0_99_maint/boilerplate.py
branches/v0_99_maint/lib/matplotlib/pyplot.py
Modified: branches/v0_99_maint/CHANGELOG
===================================================================
--- branches/v0_99_maint/CHANGELOG 2009-08-03 19:31:05 UTC (rev 7337)
+++ branches/v0_99_maint/CHANGELOG 2009-08-03 19:41:32 UTC (rev 7338)
@@ -1,3 +1,5 @@
+2009-08-03 Fixed boilerplate.py so it doesn't break the ReST docs. - JKS
+
======================================================================
2009-07-31 Tagging 0.99.0.rc1 at 7314 - MGD
Modified: branches/v0_99_maint/boilerplate.py
===================================================================
--- branches/v0_99_maint/boilerplate.py 2009-08-03 19:31:05 UTC (rev 7337)
+++ branches/v0_99_maint/boilerplate.py 2009-08-03 19:41:32 UTC (rev 7338)
@@ -21,7 +21,6 @@
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def %(func)s(%(argspec)s):
- %(docstring)s
%(ax)s = gca()
# allow callers to override the hold state by passing hold=True|False
%(washold)s = %(ax)s.ishold()
@@ -35,16 +34,19 @@
%(ax)s.hold(%(washold)s)
%(mappable)s
return %(ret)s
+if Axes.%(func)s.__doc__ is not None:
+ %(func)s.__doc__ = dedent(Axes.%(func)s.__doc__) + __docstring_addendum
"""
_fmtmisc = """\
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def %(func)s(%(argspec)s):
- %(docstring)s
%(ret)s = gca().%(func)s(%(call)s)
draw_if_interactive()
return %(ret)s
+if Axes.%(func)s.__doc__ is not None:
+ %(func)s.__doc__ = dedent(Axes.%(func)s.__doc__)
"""
# these methods are all simple wrappers of Axes methods by the same
@@ -138,19 +140,6 @@
"""
return '\n'.join(x.rstrip() for x in string.split('\n'))
-def make_docstring(cmd, mention_hold):
- func = getattr(Axes, cmd)
- docstring = inspect.getdoc(func)
- if docstring is None:
- return ""
- escaped = re.sub(r'\\', r'\\\\', docstring)
- if mention_hold:
- escaped += '''
-
-Additional kwargs: hold = [True|False] overrides default hold state
-'''
- return '"""'+escaped+'"""'
-
for fmt,cmdlist in (_fmtplot,_plotcommands),(_fmtmisc,_misccommands):
for func in cmdlist:
# For some commands, an additional line is needed to set the
@@ -160,9 +149,6 @@
else:
mappable = ''
- # Format docstring
- docstring = make_docstring(func, fmt is _fmtplot)
-
# Get argspec of wrapped function
args, varargs, varkw, defaults = inspect.getargspec(getattr(Axes, func))
args.pop(0) # remove 'self' argument
Modified: branches/v0_99_maint/lib/matplotlib/pyplot.py
===================================================================
--- branches/v0_99_maint/lib/matplotlib/pyplot.py 2009-08-03 19:31:05 UTC (rev 7337)
+++ branches/v0_99_maint/lib/matplotlib/pyplot.py 2009-08-03 19:41:32 UTC (rev 7338)
@@ -1608,72 +1608,17 @@
draw_if_interactive()
+# This is added to docstrings of autogenerated plotting functions
+__docstring_addendum = """
+
+Additional kwargs: hold = [True|False] overrides default hold state"""
+
## Plotting part 2: autogenerated wrappers for axes methods ##
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def acorr(x, hold=None, **kwargs):
- """call signature::
-
- acorr(x, normed=True, detrend=mlab.detrend_none, usevlines=True,
- maxlags=10, **kwargs)
-
-Plot the autocorrelation of *x*. If *normed* = *True*,
-normalize the data by the autocorrelation at 0-th lag. *x* is
-detrended by the *detrend* callable (default no normalization).
-
-Data are plotted as ``plot(lags, c, **kwargs)``
-
-Return value is a tuple (*lags*, *c*, *line*) where:
-
- - *lags* are a length 2*maxlags+1 lag vector
-
- - *c* is the 2*maxlags+1 auto correlation vector
-
- - *line* is a :class:`~matplotlib.lines.Line2D` instance
- returned by :meth:`plot`
-
-The default *linestyle* is None and the default *marker* is
-``'o'``, though these can be overridden with keyword args.
-The cross correlation is performed with
-:func:`numpy.correlate` with *mode* = 2.
-
-If *usevlines* is *True*, :meth:`~matplotlib.axes.Axes.vlines`
-rather than :meth:`~matplotlib.axes.Axes.plot` is used to draw
-vertical lines from the origin to the acorr. Otherwise, the
-plot style is determined by the kwargs, which are
-:class:`~matplotlib.lines.Line2D` properties.
-
-*maxlags* is a positive integer detailing the number of lags
-to show. The default value of *None* will return all
-:math:`2 \\mathrm{len}(x) - 1` lags.
-
-The return value is a tuple (*lags*, *c*, *linecol*, *b*)
-where
-
-- *linecol* is the
- :class:`~matplotlib.collections.LineCollection`
-
-- *b* is the *x*-axis.
-
-.. seealso::
-
- :meth:`~matplotlib.axes.Axes.plot` or
- :meth:`~matplotlib.axes.Axes.vlines`
- For documentation on valid kwargs.
-
-**Example:**
-
-:func:`~matplotlib.pyplot.xcorr` above, and
-:func:`~matplotlib.pyplot.acorr` below.
-
-**Example:**
-
-.. plot:: mpl_examples/pylab_examples/xcorr_demo.py
-
-Additional kwargs: hold = [True|False] overrides default hold state
-"""
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
@@ -1687,51 +1632,12 @@
ax.hold(washold)
return ret
+if Axes.acorr.__doc__ is not None:
+ acorr.__doc__ = dedent(Axes.acorr.__doc__) + __docstring_addendum
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def arrow(x, y, dx, dy, hold=None, **kwargs):
- """call signature::
-
- arrow(x, y, dx, dy, **kwargs)
-
-Draws arrow on specified axis from (*x*, *y*) to (*x* + *dx*,
-*y* + *dy*).
-
-Optional kwargs control the arrow properties:
- alpha: float (0.0 transparent through 1.0 opaque)
- animated: [True | False]
- antialiased or aa: [True | False] or None for default
- axes: an :class:`~matplotlib.axes.Axes` instance
- clip_box: a :class:`matplotlib.transforms.Bbox` instance
- clip_on: [True | False]
- clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ]
- color: matplotlib color arg or sequence of rgba tuples
- contains: a callable function
- edgecolor or ec: mpl color spec, or None for default, or 'none' for no color
- facecolor or fc: mpl color spec, or None for default, or 'none' for no color
- figure: a :class:`matplotlib.figure.Figure` instance
- fill: [True | False]
- gid: an id string
- hatch: [ '/' | '\\\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ]
- label: any string
- linestyle or ls: ['solid' | 'dashed' | 'dashdot' | 'dotted']
- linewidth or lw: float or None for default
- lod: [True | False]
- picker: [None|float|boolean|callable]
- rasterized: [True | False | None]
- snap: unknown
- transform: :class:`~matplotlib.transforms.Transform` instance
- url: a url string
- visible: [True | False]
- zorder: any number
-
-**Example:**
-
-.. plot:: mpl_examples/pylab_examples/arrow_demo.py
-
-Additional kwargs: hold = [True|False] overrides default hold state
-"""
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
@@ -1745,90 +1651,12 @@
ax.hold(washold)
return ret
+if Axes.arrow.__doc__ is not None:
+ arrow.__doc__ = dedent(Axes.arrow.__doc__) + __docstring_addendum
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def axhline(y=0, xmin=0, xmax=1, hold=None, **kwargs):
- """call signature::
-
- axhline(y=0, xmin=0, xmax=1, **kwargs)
-
-Axis Horizontal Line
-
-Draw a horizontal line at *y* from *xmin* to *xmax*. With the
-default values of *xmin* = 0 and *xmax* = 1, this line will
-always span the horizontal extent of the axes, regardless of
-the xlim settings, even if you change them, eg. with the
-:meth:`set_xlim` command. That is, the horizontal extent is
-in axes coords: 0=left, 0.5=middle, 1.0=right but the *y*
-location is in data coordinates.
-
-Return value is the :class:`~matplotlib.lines.Line2D`
-instance. kwargs are the same as kwargs to plot, and can be
-used to control the line properties. Eg.,
-
-* draw a thick red hline at *y* = 0 that spans the xrange
-
- >>> axhline(linewidth=4, color='r')
-
-* draw a default hline at *y* = 1 that spans the xrange
-
- >>> axhline(y=1)
-
-* draw a default hline at *y* = .5 that spans the the middle half of
- the xrange
-
- >>> axhline(y=.5, xmin=0.25, xmax=0.75)
-
-Valid kwargs are :class:`~matplotlib.lines.Line2D` properties:
-
- alpha: float (0.0 transparent through 1.0 opaque)
- animated: [True | False]
- antialiased or aa: [True | False]
- axes: an :class:`~matplotlib.axes.Axes` instance
- clip_box: a :class:`matplotlib.transforms.Bbox` instance
- clip_on: [True | False]
- clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ]
- color or c: any matplotlib color
- contains: a callable function
- dash_capstyle: ['butt' | 'round' | 'projecting']
- dash_joinstyle: ['miter' | 'round' | 'bevel']
- dashes: sequence of on/off ink in points
- data: 2D array
- drawstyle: [ 'default' | 'steps' | 'steps-pre' | 'steps-mid' | 'steps-post' ]
- figure: a :class:`matplotlib.figure.Figure` instance
- fillstyle: ['full' | 'left' | 'right' | 'bottom' | 'top']
- gid: an id string
- label: any string
- linestyle or ls: [ '-' | '--' | '-.' | ':' | 'None' | ' ' | '' ] and any drawstyle in combination with a linestyle, e.g. 'steps--'.
- linewidth or lw: float value in points
- lod: [True | False]
- marker: [ '+' | '*' | ',' | '.' | '1' | '2' | '3' | '4' | '<' | '>' | 'D' | 'H' | '^' | '_' | 'd' | 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|' | TICKUP | TICKDOWN | TICKLEFT | TICKRIGHT | 'None' | ' ' | '' ]
- markeredgecolor or mec: any matplotlib color
- markeredgewidth or mew: float value in points
- markerfacecolor or mfc: any matplotlib color
- markersize or ms: float
- markevery: None | integer | (startind, stride)
- picker: float distance in points or callable pick function ``fn(artist, event)``
- pickradius: float distance in points
- rasterized: [True | False | None]
- snap: unknown
- solid_capstyle: ['butt' | 'round' | 'projecting']
- solid_joinstyle: ['miter' | 'round' | 'bevel']
- transform: a :class:`matplotlib.transforms.Transform` instance
- url: a url string
- visible: [True | False]
- xdata: 1D array
- ydata: 1D array
- zorder: any number
-
-.. seealso::
-
- :meth:`axhspan`
- for example plot and source code
-
-Additional kwargs: hold = [True|False] overrides default hold state
-"""
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
@@ -1842,72 +1670,12 @@
ax.hold(washold)
return ret
+if Axes.axhline.__doc__ is not None:
+ axhline.__doc__ = dedent(Axes.axhline.__doc__) + __docstring_addendum
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def axhspan(ymin, ymax, xmin=0, xmax=1, hold=None, **kwargs):
- """call signature::
-
- axhspan(ymin, ymax, xmin=0, xmax=1, **kwargs)
-
-Axis Horizontal Span.
-
-*y* coords are in data units and *x* coords are in axes (relative
-0-1) units.
-
-Draw a horizontal span (rectangle) from *ymin* to *ymax*.
-With the default values of *xmin* = 0 and *xmax* = 1, this
-always spans the xrange, regardless of the xlim settings, even
-if you change them, eg. with the :meth:`set_xlim` command.
-That is, the horizontal extent is in axes coords: 0=left,
-0.5=middle, 1.0=right but the *y* location is in data
-coordinates.
-
-Return value is a :class:`matplotlib.patches.Polygon`
-instance.
-
-Examples:
-
-* draw a gray rectangle from *y* = 0.25-0.75 that spans the
- horizontal extent of the axes
-
- >>> axhspan(0.25, 0.75, facecolor='0.5', alpha=0.5)
-
-Valid kwargs are :class:`~matplotlib.patches.Polygon` properties:
-
- alpha: float (0.0 transparent through 1.0 opaque)
- animated: [True | False]
- antialiased or aa: [True | False] or None for default
- axes: an :class:`~matplotlib.axes.Axes` instance
- clip_box: a :class:`matplotlib.transforms.Bbox` instance
- clip_on: [True | False]
- clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ]
- color: matplotlib color arg or sequence of rgba tuples
- contains: a callable function
- edgecolor or ec: mpl color spec, or None for default, or 'none' for no color
- facecolor or fc: mpl color spec, or None for default, or 'none' for no color
- figure: a :class:`matplotlib.figure.Figure` instance
- fill: [True | False]
- gid: an id string
- hatch: [ '/' | '\\\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ]
- label: any string
- linestyle or ls: ['solid' | 'dashed' | 'dashdot' | 'dotted']
- linewidth or lw: float or None for default
- lod: [True | False]
- picker: [None|float|boolean|callable]
- rasterized: [True | False | None]
- snap: unknown
- transform: :class:`~matplotlib.transforms.Transform` instance
- url: a url string
- visible: [True | False]
- zorder: any number
-
-**Example:**
-
-.. plot:: mpl_examples/pylab_examples/axhspan_demo.py
-
-Additional kwargs: hold = [True|False] overrides default hold state
-"""
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
@@ -1921,90 +1689,12 @@
ax.hold(washold)
return ret
+if Axes.axhspan.__doc__ is not None:
+ axhspan.__doc__ = dedent(Axes.axhspan.__doc__) + __docstring_addendum
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def axvline(x=0, ymin=0, ymax=1, hold=None, **kwargs):
- """call signature::
-
- axvline(x=0, ymin=0, ymax=1, **kwargs)
-
-Axis Vertical Line
-
-Draw a vertical line at *x* from *ymin* to *ymax*. With the
-default values of *ymin* = 0 and *ymax* = 1, this line will
-always span the vertical extent of the axes, regardless of the
-ylim settings, even if you change them, eg. with the
-:meth:`set_ylim` command. That is, the vertical extent is in
-axes coords: 0=bottom, 0.5=middle, 1.0=top but the *x* location
-is in data coordinates.
-
-Return value is the :class:`~matplotlib.lines.Line2D`
-instance. kwargs are the same as kwargs to plot, and can be
-used to control the line properties. Eg.,
-
-* draw a thick red vline at *x* = 0 that spans the yrange
-
- >>> axvline(linewidth=4, color='r')
-
-* draw a default vline at *x* = 1 that spans the yrange
-
- >>> axvline(x=1)
-
-* draw a default vline at *x* = .5 that spans the the middle half of
- the yrange
-
- >>> axvline(x=.5, ymin=0.25, ymax=0.75)
-
-Valid kwargs are :class:`~matplotlib.lines.Line2D` properties:
-
- alpha: float (0.0 transparent through 1.0 opaque)
- animated: [True | False]
- antialiased or aa: [True | False]
- axes: an :class:`~matplotlib.axes.Axes` instance
- clip_box: a :class:`matplotlib.transforms.Bbox` instance
- clip_on: [True | False]
- clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ]
- color or c: any matplotlib color
- contains: a callable function
- dash_capstyle: ['butt' | 'round' | 'projecting']
- dash_joinstyle: ['miter' | 'round' | 'bevel']
- dashes: sequence of on/off ink in points
- data: 2D array
- drawstyle: [ 'default' | 'steps' | 'steps-pre' | 'steps-mid' | 'steps-post' ]
- figure: a :class:`matplotlib.figure.Figure` instance
- fillstyle: ['full' | 'left' | 'right' | 'bottom' | 'top']
- gid: an id string
- label: any string
- linestyle or ls: [ '-' | '--' | '-.' | ':' | 'None' | ' ' | '' ] and any drawstyle in combination with a linestyle, e.g. 'steps--'.
- linewidth or lw: float value in points
- lod: [True | False]
- marker: [ '+' | '*' | ',' | '.' | '1' | '2' | '3' | '4' | '<' | '>' | 'D' | 'H' | '^' | '_' | 'd' | 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|' | TICKUP | TICKDOWN | TICKLEFT | TICKRIGHT | 'None' | ' ' | '' ]
- markeredgecolor or mec: any matplotlib color
- markeredgewidth or mew: float value in points
- markerfacecolor or mfc: any matplotlib color
- markersize or ms: float
- markevery: None | integer | (startind, stride)
- picker: float distance in points or callable pick function ``fn(artist, event)``
- pickradius: float distance in points
- rasterized: [True | False | None]
- snap: unknown
- solid_capstyle: ['butt' | 'round' | 'projecting']
- solid_joinstyle: ['miter' | 'round' | 'bevel']
- transform: a :class:`matplotlib.transforms.Transform` instance
- url: a url string
- visible: [True | False]
- xdata: 1D array
- ydata: 1D array
- zorder: any number
-
-.. seealso::
-
- :meth:`axhspan`
- for example plot and source code
-
-Additional kwargs: hold = [True|False] overrides default hold state
-"""
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
@@ -2018,73 +1708,12 @@
ax.hold(washold)
return ret
+if Axes.axvline.__doc__ is not None:
+ axvline.__doc__ = dedent(Axes.axvline.__doc__) + __docstring_addendum
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def axvspan(xmin, xmax, ymin=0, ymax=1, hold=None, **kwargs):
- """call signature::
-
- axvspan(xmin, xmax, ymin=0, ymax=1, **kwargs)
-
-Axis Vertical Span.
-
-*x* coords are in data units and *y* coords are in axes (relative
-0-1) units.
-
-Draw a vertical span (rectangle) from *xmin* to *xmax*. With
-the default values of *ymin* = 0 and *ymax* = 1, this always
-spans the yrange, regardless of the ylim settings, even if you
-change them, eg. with the :meth:`set_ylim` command. That is,
-the vertical extent is in axes coords: 0=bottom, 0.5=middle,
-1.0=top but the *y* location is in data coordinates.
-
-Return value is the :class:`matplotlib.patches.Polygon`
-instance.
-
-Examples:
-
-* draw a vertical green translucent rectangle from x=1.25 to 1.55 that
- spans the yrange of the axes
-
- >>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5)
-
-Valid kwargs are :class:`~matplotlib.patches.Polygon`
-properties:
-
- alpha: float (0.0 transparent through 1.0 opaque)
- animated: [True | False]
- antialiased or aa: [True | False] or None for default
- axes: an :class:`~matplotlib.axes.Axes` instance
- clip_box: a :class:`matplotlib.transforms.Bbox` instance
- clip_on: [True | False]
- clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ]
- color: matplotlib color arg or sequence of rgba tuples
- contains: a callable function
- edgecolor or ec: mpl color spec, or None for default, or 'none' for no color
- facecolor or fc: mpl color spec, or None for default, or 'none' for no color
- figure: a :class:`matplotlib.figure.Figure` instance
- fill: [True | False]
- gid: an id string
- hatch: [ '/' | '\\\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ]
- label: any string
- linestyle or ls: ['solid' | 'dashed' | 'dashdot' | 'dotted']
- linewidth or lw: float or None for default
- lod: [True | False]
- picker: [None|float|boolean|callable]
- rasterized: [True | False | None]
- snap: unknown
- transform: :class:`~matplotlib.transforms.Transform` instance
- url: a url string
- visible: [True | False]
- zorder: any number
-
-.. seealso::
-
- :meth:`axhspan`
- for example plot and source code
-
-Additional kwargs: hold = [True|False] overrides default hold state
-"""
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
@@ -2098,110 +1727,12 @@
ax.hold(washold)
return ret
+if Axes.axvspan.__doc__ is not None:
+ axvspan.__doc__ = dedent(Axes.axvspan.__doc__) + __docstring_addendum
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def bar(left, height, width=0.80000000000000004, bottom=None, color=None, edgecolor=None, linewidth=None, yerr=None, xerr=None, ecolor=None, capsize=3, align='edge', orientation='vertical', log=False, hold=None, **kwargs):
- """call signature::
-
- bar(left, height, width=0.8, bottom=0,
- color=None, edgecolor=None, linewidth=None,
- yerr=None, xerr=None, ecolor=None, capsize=3,
- align='edge', orientation='vertical', log=False)
-
-Make a bar plot with rectangles bounded by:
-
- *left*, *left* + *width*, *bottom*, *bottom* + *height*
- (left, right, bottom and top edges)
-
-*left*, *height*, *width*, and *bottom* can be either scalars
-or sequences
-
-Return value is a list of
-:class:`matplotlib.patches.Rectangle` instances.
-
-Required arguments:
-
- ======== ===============================================
- Argument Description
- ======== ===============================================
- *left* the x coordinates of the left sides of the bars
- *height* the heights of the bars
- ======== ===============================================
-
-Optional keyword arguments:
-
- =============== ==========================================
- Keyword Description
- =============== ==========================================
- *width* the widths of the bars
- *bottom* the y coordinates of the bottom edges of
- the bars
- *color* the colors of the bars
- *edgecolor* the colors of the bar edges
- *linewidth* width of bar edges; None means use default
- linewidth; 0 means don't draw edges.
- *xerr* if not None, will be used to generate
- errorbars on the bar chart
- *yerr* if not None, will be used to generate
- errorbars on the bar chart
- *ecolor* specifies the color of any errorbar
- *capsize* (default 3) determines the length in
- points of the error bar caps
- *align* 'edge' (default) | 'center'
- *orientation* 'vertical' | 'horizontal'
- *log* [False|True] False (default) leaves the
- orientation axis as-is; True sets it to
- log scale
- =============== ==========================================
-
-For vertical bars, *align* = 'edge' aligns bars by their left
-edges in left, while *align* = 'center' interprets these
-values as the *x* coordinates of the bar centers. For
-horizontal bars, *align* = 'edge' aligns bars by their bottom
-edges in bottom, while *align* = 'center' interprets these
-values as the *y* coordinates of the bar centers.
-
-The optional arguments *color*, *edgecolor*, *linewidth*,
-*xerr*, and *yerr* can be either scalars or sequences of
-length equal to the number of bars. This enables you to use
-bar as the basis for stacked bar charts, or candlestick plots.
-
-Other optional kwargs:
-
- alpha: float (0.0 transparent through 1.0 opaque)
- animated: [True | False]
- antialiased or aa: [True | False] or None for default
- axes: an :class:`~matplotlib.axes.Axes` instance
- clip_box: a :class:`matplotlib.transforms.Bbox` instance
- clip_on: [True | False]
- clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ]
- color: matplotlib color arg or sequence of rgba tuples
- contains: a callable function
- edgecolor or ec: mpl color spec, or None for default, or 'none' for no color
- facecolor or fc: mpl color spec, or None for default, or 'none' for no color
- figure: a :class:`matplotlib.figure.Figure` instance
- fill: [True | False]
- gid: an id string
- hatch: [ '/' | '\\\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ]
- label: any string
- linestyle or ls: ['solid' | 'dashed' | 'dashdot' | 'dotted']
- linewidth or lw: float or None for default
- lod: [True | False]
- picker: [None|float|boolean|callable]
- rasterized: [True | False | None]
- snap: unknown
- transform: :class:`~matplotlib.transforms.Transform` instance
- url: a url string
- visible: [True | False]
- zorder: any number
-
-**Example:** A stacked bar chart.
-
-.. plot:: mpl_examples/pylab_examples/bar_stacked.py
-
-Additional kwargs: hold = [True|False] overrides default hold state
-"""
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
@@ -2215,100 +1746,12 @@
ax.hold(washold)
return ret
+if Axes.bar.__doc__ is not None:
+ bar.__doc__ = dedent(Axes.bar.__doc__) + __docstring_addendum
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def barh(bottom, width, height=0.80000000000000004, left=None, hold=None, **kwargs):
- """call signature::
-
- barh(bottom, width, height=0.8, left=0, **kwargs)
-
-Make a horizontal bar plot with rectangles bounded by:
-
- *left*, *left* + *width*, *bottom*, *bottom* + *height*
- (left, right, bottom and top edges)
-
-*bottom*, *width*, *height*, and *left* can be either scalars
-or sequences
-
-Return value is a list of
-:class:`matplotlib.patches.Rectangle` instances.
-
-Required arguments:
-
- ======== ======================================================
- Argument Description
- ======== ======================================================
- *bottom* the vertical positions of the bottom edges of the bars
- *width* the lengths of the bars
- ======== ======================================================
-
-Optional keyword arguments:
-
- =============== ==========================================
- Keyword Description
- =============== ==========================================
- *height* the heights (thicknesses) of the bars
- *left* the x coordinates of the left edges of the
- bars
- *color* the colors of the bars
- *edgecolor* the colors of the bar edges
- *linewidth* width of bar edges; None means use default
- linewidth; 0 means don't draw edges.
- *xerr* if not None, will be used to generate
- errorbars on the bar chart
- *yerr* if not None, will be used to generate
- errorbars on the bar chart
- *ecolor* specifies the color of any errorbar
- *capsize* (default 3) determines the length in
- points of the error bar caps
- *align* 'edge' (default) | 'center'
- *log* [False|True] False (default) leaves the
- horizontal axis as-is; True sets it to log
- scale
- =============== ==========================================
-
-Setting *align* = 'edge' aligns bars by their bottom edges in
-bottom, while *align* = 'center' interprets these values as
-the *y* coordinates of the bar centers.
-
-The optional arguments *color*, *edgecolor*, *linewidth*,
-*xerr*, and *yerr* can be either scalars or sequences of
-length equal to the number of bars. This enables you to use
-barh as the basis for stacked bar charts, or candlestick
-plots.
-
-other optional kwargs:
-
- alpha: float (0.0 transparent through 1.0 opaque)
- animated: [True | False]
- antialiased or aa: [True | False] or None for default
- axes: an :class:`~matplotlib.axes.Axes` instance
- clip_box: a :class:`matplotlib.transforms.Bbox` instance
- clip_on: [True | False]
- clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ]
- color: matplotlib color arg or sequence of rgba tuples
- contains: a callable function
- edgecolor or ec: mpl color spec, or None for default, or 'none' for no color
- facecolor or fc: mpl color spec, or None for default, or 'none' for no color
- figure: a :class:`matplotlib.figure.Figure` instance
- fill: [True | False]
- gid: an id string
- hatch: [ '/' | '\\\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ]
- label: any string
- linestyle or ls: ['solid' | 'dashed' | 'dashdot' | 'dotted']
- linewidth or lw: float or None for default
- lod: [True | False]
- picker: [None|float|boolean|callable]
- rasterized: [True | False | None]
- snap: unknown
- transform: :class:`~matplotlib.transforms.Transform` instance
- url: a url string
- visible: [True | False]
- zorder: any number
-
-Additional kwargs: hold = [True|False] overrides default hold state
-"""
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
@@ -2322,77 +1765,12 @@
ax.hold(washold)
return ret
+if Axes.barh.__doc__ is not None:
+ barh.__doc__ = dedent(Axes.barh.__doc__) + __docstring_addendum
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def broken_barh(xranges, yrange, hold=None, **kwargs):
- """call signature::
-
- broken_barh(self, xranges, yrange, **kwargs)
-
-A collection of horizontal bars spanning *yrange* with a sequence of
-*xranges*.
-
-Required arguments:
-
- ========= ==============================
- Argument Description
- ========= ==============================
- *xranges* sequence of (*xmin*, *xwidth*)
- *yrange* sequence of (*ymin*, *ywidth*)
- ========= ==============================
-
-kwargs are
-:class:`matplotlib.collections.BrokenBarHCollection`
-properties:
-
- alpha: float
- animated: [True | False]
- antialiased or antialiaseds: Boolean or sequence of booleans
- array: unknown
- axes: an :class:`~matplotlib.axes.Axes` instance
- clim: a length 2 sequence of floats
- clip_box: a :class:`matplotlib.transforms.Bbox` instance
- clip_on: [True | False]
- clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ]
- cmap: a colormap
- color: matplotlib color arg or sequence of rgba tuples
- colorbar: unknown
- contains: a callable function
- edgecolor or edgecolors: matplotlib color arg or sequence of rgba tuples
- facecolor or facecolors: matplotlib color arg or sequence of rgba tuples
- figure: a :class:`matplotlib.figure.Figure` instance
- gid: an id string
- label: any string
- linestyle or linestyles or dashes: ['solid' | 'dashed', 'dashdot', 'dotted' | (offset, on-off-dash-seq) ]
- linewidth or lw or linewidths: float or sequence of floats
- lod: [True | False]
- norm: unknown
- offsets: float or sequence of floats
- picker: [None|float|boolean|callable]
- pickradius: unknown
- rasterized: [True | False | None]
- snap: unknown
- transform: :class:`~matplotlib.transforms.Transform` instance
- url: a url string
- urls: unknown
- visible: [True | False]
- zorder: any number
-
-these can either be a single argument, ie::
-
- facecolors = 'black'
-
-or a sequence of arguments for the various bars, ie::
-
- facecolors = ('black', 'red', 'green')
-
-**Example:**
-
-.. plot:: mpl_examples/pylab_examples/broken_barh.py
-
-Additional kwargs: hold = [True|False] overrides default hold state
-"""
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
@@ -2406,55 +1784,12 @@
ax.hold(washold)
return ret
+if Axes.broken_barh.__doc__ is not None:
+ broken_barh.__doc__ = dedent(Axes.broken_barh.__doc__) + __docstring_addendum
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def boxplot(x, notch=0, sym='b+', vert=1, whis=1.5, positions=None, widths=None, hold=None):
- """call signature::
-
- boxplot(x, notch=0, sym='+', vert=1, whis=1.5,
- positions=None, widths=None)
-
-Make a box and whisker plot for each column of *x* or each
-vector in sequence *x*. The box extends from the lower to
-upper quartile values of the data, with a line at the median.
-The whiskers extend from the box to show the range of the
-data. Flier points are those past the end of the whiskers.
-
-- *notch* = 0 (default) produces a rectangular box plot.
-- *notch* = 1 will produce a notched box plot
-
-*sym* (default 'b+') is the default symbol for flier points.
-Enter an empty string ('') if you don't want to show fliers.
-
-- *vert* = 1 (default) makes the boxes vertical.
-- *vert* = 0 makes horizontal boxes. This seems goofy, but
- that's how Matlab did it.
-
-*whis* (default 1.5) defines the length of the whiskers as
-a function of the inner quartile range. They extend to the
-most extreme data point within ( ``whis*(75%-25%)`` ) data range.
-
-*positions* (default 1,2,...,n) sets the horizontal positions of
-the boxes. The ticks and limits are automatically set to match
-the positions.
-
-*widths* is either a scalar or a vector and sets the width of
-each box. The default is 0.5, or ``0.15*(distance between extreme
-positions)`` if that is smaller.
-
-*x* is an array or a sequence of vectors.
-
-Returns a dictionary mapping each component of the boxplot
-to a list of the :class:`matplotlib.lines.Line2D`
-instances created.
-
-**Example:**
-
-.. plot:: pyplots/boxplot_demo.py
-
-Additional kwargs: hold = [True|False] overrides default hold state
-"""
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
@@ -2468,145 +1803,12 @@
ax.hold(washold)
return ret
+if Axes.boxplot.__doc__ is not None:
+ boxplot.__doc__ = dedent(Axes.boxplot.__doc__) + __docstring_addendum
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def cohere(x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=0, pad_to=None, sides='default', scale_by_freq=None, hold=None, **kwargs):
- """call signature::
-
- cohere(x, y, NFFT=256, Fs=2, Fc=0, detrend = mlab.detrend_none,
- window = mlab.window_hanning, noverlap=0, pad_to=None,
- sides='default', scale_by_freq=None, **kwargs)
-
-cohere the coherence between *x* and *y*. Coherence is the normalized
-cross spectral density:
-
-.. math::
-
- C_{xy} = \\frac{|P_{xy}|^2}{P_{xx}P_{yy}}
-
-Keyword arguments:
-
- *NFFT*: integer
- The number of data points used in each block for the FFT.
- Must be even; a power 2 is most efficient. The default value is 256.
-
- *Fs*: scalar
- The sampling frequency (samples per time unit). It is used
- to calculate the Fourier frequencies, freqs, in cycles per time
- unit. The default value is 2.
-
- *detrend*: callable
- The function applied to each segment before fft-ing,
- designed to remove the mean or linear trend. Unlike in
- matlab, where the *detrend* parameter is a vector, in
- matplotlib is it a function. The :mod:`~matplotlib.pylab`
- module defines :func:`~matplotlib.pylab.detrend_none`,
- :func:`~matplotlib.pylab.detrend_mean`, and
- :func:`~matplotlib.pylab.detrend_linear`, but you can use
- a custom function as well.
-
- *window*: callable or ndarray
- A function or a vector of length *NFFT*. To create window
- vectors see :func:`window_hanning`, :func:`window_none`,
- :func:`numpy.blackman`, :func:`numpy.hamming`,
- :func:`numpy.bartlett`, :func:`scipy.signal`,
- :func:`scipy.signal.get_window`, etc. The default is
- :func:`window_hanning`. If a function is passed as the
- argument, it must take a data segment as an argument and
- return the windowed version of the segment.
-
- *noverlap*: integer
- The number of points of overlap between blocks. The default value
- is 0 (no overlap).
-
- *pad_to*: integer
- The number of points to which the data segment is padded when
- performing the FFT. This can be different from *NFFT*, which
- specifies the number of data points used. While not increasing
- the actual resolution of the psd (the minimum distance between
- resolvable peaks), this can give more points in the plot,
- allowing for more detail. This corresponds to the *n* parameter
- in the call to fft(). The default is None, which sets *pad_to*
- equal to *NFFT*
-
- *sides*: [ 'default' | 'onesided' | 'twosided' ]
- Specifies which sides of the PSD to return. Default gives the
- default behavior, which returns one-sided for real data and both
- for complex data. 'onesided' forces the return of a one-sided PSD,
- while 'twosided' forces two-sided.
-
- *scale_by_freq*: boolean
- Specifies whether the resulting density values should be scaled
- by the scaling frequency, which gives density in units of Hz^-1.
- This allows for integration over the returned frequency values.
- The default is True for MatLab compatibility.
-
- *Fc*: integer
- The center frequency of *x* (defaults to 0), which offsets
- the x extents of the plot to reflect the frequency range used
- when a signal is acquired and then filtered and downsampled to
- baseband.
-
-The return value is a tuple (*Cxy*, *f*), where *f* are the
-frequencies of the coherence vector.
-
-kwargs are applied to the lines.
-
-References:
-
- * Bendat & Piersol -- Random Data: Analysis and Measurement
- Procedures, John Wiley & Sons (1986)
-
-kwargs control the :class:`~matplotlib.lines.Line2D`
-properties of the coherence plot:
-
- alpha: float (0.0 transparent through 1.0 opaque)
- animated: [True | False]
- antialiased or aa: [True | False]
- axes: an :class:`~matplotlib.axes.Axes` instance
- clip_box: a :class:`matplotlib.transforms.Bbox` instance
- clip_on: [True | False]
- clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ]
- color or c: any matplotlib color
- contains: a callable function
- dash_capstyle: ['butt' | 'round' | 'projecting']
- dash_joinstyle: ['miter' | 'round' | 'bevel']
- dashes: sequence of on/off ink in points
- data: 2D array
- drawstyle: [ 'default' | 'steps' | 'steps-pre' | 'steps-mid' | 'steps-post' ]
- figure: a :class:`matplotlib.figure.Figure` instance
- fillstyle: ['full' | 'left' | 'right' | 'bottom' | 'top']
- gid: an id string
- label: any string
- linestyle or ls: [ '-' | '--' | '-.' | ':' | 'None' | ' ' | '' ] and any drawstyle in combination with a linestyle, e.g. 'steps--'.
- linewidth or lw: float value in points
- lod: [True | False]
- marker: [ '+' | '*' | ',' | '.' | '1' | '2' | '3' | '4' | '<' | '>' | 'D' | 'H' | '^' | '_' | 'd' | 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|' | TICKUP | TICKDOWN | TICKLEFT | TICKRIGHT | 'None' | ' ' | '' ]
- markeredgecolor or mec: any matplotlib color
- markeredgewidth or mew: float value in points
- markerfacecolor or mfc: any matplotlib color
- markersize or ms: float
- markevery: None | integer | (startind, stride)
- picker: float distance in points or callable pick function ``fn(artist, event)``
- pickradius: float distance in points
- rasterized: [True | False | None]
- snap: unknown
- solid_capstyle: ['butt' | 'round' | 'projecting']
- solid_joinstyle: ['miter' | 'round' | 'bevel']
- transform: a :class:`matplotlib.transforms.Transform` instance
- url: a url string
- visible: [True | False]
- xdata: 1D array
- ydata: 1D array
- zorder: any number
-
-**Example:**
-
-.. plot:: mpl_examples/pylab_examples/cohere_demo.py
-
-Additional kwargs: hold = [True|False] overrides default hold state
-"""
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
@@ -2620,75 +1822,12 @@
ax.hold(washold)
return ret
+if Axes.cohere.__doc__ is not None:
+ cohere.__doc__ = dedent(Axes.cohere.__doc__) + __docstring_addendum
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def clabel(CS, *args, **kwargs):
- """call signature::
-
- clabel(cs, **kwargs)
-
-adds labels to line contours in *cs*, where *cs* is a
-:class:`~matplotlib.contour.ContourSet` object returned by
-contour.
-
-::
-
- clabel(cs, v, **kwargs)
-
-only labels contours listed in *v*.
-
-Optional keyword arguments:
-
- *fontsize*:
- See http://matplotlib.sf.net/fonts.html
-
- *colors*:
- - if *None*, the color of each label matches the color of
- the corresponding contour
-
- - if one string color, e.g. *colors* = 'r' or *colors* =
- 'red', all labels will be plotted in this color
-
- - if a tuple of matplotlib color args (string, float, rgb, etc),
- different labels will be plotted in different colors in the order
- specified
-
- *inline*:
- controls whether the underlying contour is removed or
- not. Default is *True*.
-
- *inline_spacing*:
- space in pixels to leave on each side of label when
- placing inline. Defaults to 5. This spacing will be
- exact for labels at locations where the contour is
- straight, less so for labels on curved contours.
-
- *fmt*:
- a format string for the label. Default is '%1.3f'
- Alternatively, this can be a dictionary matching contour
- levels with arbitrary strings to use for each contour level
- (i.e., fmt[level]=string)
-
- *manual*:
- if *True*, contour labels will be placed manually using
- mouse clicks. Click the first button near a contour to
- add a label, click the second button (or potentially both
- mouse buttons at once) to finish adding labels. The third
- button can be used to remove the last label added, but
- only if labels are not inline. Alternatively, the keyboard
- can be used to select label locations (enter to end label
- placement, delete or backspace act like the third mouse button,
- and any other key will select a label location).
-
- *rightside_up*:
- if *True* (default), label rotations will always be plus
- or minus 90 degrees from level.
-
-.. plot:: mpl_examples/pylab_examples/contour_demo.py
-
-Additional kwargs: hold = [True|False] overrides default hold state
-"""
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
@@ -2702,172 +1841,12 @@
ax.hold(washold)
return ret
+if Axes.clabel.__doc__ is not None:
+ clabel.__doc__ = dedent(Axes.clabel.__doc__) + __docstring_addendum
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def contour(*args, **kwargs):
- """:func:`~matplotlib.pyplot.contour` and
-:func:`~matplotlib.pyplot.contourf` draw contour lines and
-filled contours, respectively. Except as noted, function
-signatures and return values are the same for both versions.
-
-:func:`~matplotlib.pyplot.contourf` differs from the Matlab
-(TM) version in that it does not draw the polygon edges,
-because the contouring engine yields simply connected regions
-with branch cuts. To draw the edges, add line contours with
-calls to :func:`~matplotlib.pyplot.contour`.
-
-
-call signatures::
-
- contour(Z)
-
-make a contour plot of an array *Z*. The level values are chosen
-automatically.
-
-::
-
- contour(X,Y,Z)
-
-*X*, *Y* specify the (*x*, *y*) coordinates of the surface
-
-::
-
- contour(Z,N)
- contour(X,Y,Z,N)
-
-contour *N* automatically-chosen levels.
-
-::
-
- contour(Z,V)
- contour(X,Y,Z,V)
-
-draw contour lines at the values specified in sequence *V*
-
-::
-
- contourf(..., V)
-
-fill the (len(*V*)-1) regions between the values in *V*
-
-::
-
- contour(Z, **kwargs)
-
-Use keyword args to control colors, linewidth, origin, cmap ... see
-below for more details.
-
-*X*, *Y*, and *Z* must be arrays with the same dimensions.
-
-*Z* may be a masked array, but filled contouring may not
-handle internal masked regions correctly.
-
-``C = contour(...)`` returns a
-:class:`~matplotlib.contour.ContourSet` object.
-
-Optional keyword arguments:
-
- *colors*: [ None | string | (mpl_colors) ]
- If *None*, the colormap specified by cmap will be used.
-
- If a string, like 'r' or 'red', all levels will be plotted in this
- color.
-
- If a tuple of matplotlib color args (string, float, rgb, etc),
- different levels will be plotted in different colors in the order
- specified.
-
- *alpha*: float
- The alpha blending value
-
- *cmap*: [ None | Colormap ]
- A cm :class:`~matplotlib.cm.Colormap` instance or
- *None*. If *cmap* is *None* and *colors* is *None*, a
- default Colormap is used.
-
- *norm*: [ None | Normalize ]
- A :class:`matplotlib.colors.Normalize` instance for
- scaling data values to colors. If *norm* is *None* and
- *colors* is *None*, the default linear scaling is used.
-
- *origin*: [ None | 'upper' | 'lower' | 'image' ]
- If *None*, the first value of *Z* will correspond to the
- lower left corner, location (0,0). If 'image', the rc
- value for ``image.origin`` will be used.
-
- This keyword is not active if *X* and *Y* are specified in
- the call to contour.
-
- *extent*: [ None | (x0,x1,y0,y1) ]
-
- If *origin* is not *None*, then *extent* is interpreted as
- in :func:`matplotlib.pyplot.imshow`: it gives the outer
- pixel boundaries. In this case, the position of Z[0,0]
- is the center of the pixel, not a corner. If *origin* is
- *None*, then (*x0*, *y0*) is the position of Z[0,0], and
- (*x1*, *y1*) is the position of Z[-1,-1].
-
- This keyword is not active if *X* and *Y* are specified in
- the call to contour.
-
- *locator*: [ None | ticker.Locator subclass ]
- If *locator* is None, the default
- :class:`~matplotlib.ticker.MaxNLocator` is used. The
- locator is used to determine the contour levels if they
- are not given explicitly via the *V* argument.
-
- *extend*: [ 'neither' | 'both' | 'min' | 'max' ]
- Unless this is 'neither', contour levels are automatically
- added to one or both ends of the range so that all data
- are included. These added ranges are then mapped to the
- special colormap values which default to the ends of the
- colormap range, but can be set via
- :meth:`matplotlib.cm.Colormap.set_under` and
- :meth:`matplotlib.cm.Colormap.set_over` methods.
-
-contour-only keyword arguments:
-
- *linewidths*: [ None | number | tuple of numbers ]
- If *linewidths* is *None*, the default width in
- ``lines.linewidth`` in ``matplotlibrc`` is used.
-
- If a number, all levels will be plotted with this linewidth.
-
- If a tuple, different levels will be plotted with different
- linewidths in the order specified
-
- *linestyles*: [None | 'solid' | 'dashed' | 'dashdot' | 'dotted' ]
- If *linestyles* is *None*, the 'solid' is used.
-
- *linestyles* can also be an iterable of the above strings
- specifying a set of linestyles to be used. If this
- iterable is shorter than the number of contour levels
- it will be repeated as necessary.
-
- If contour is using a monochrome colormap and the contour
- level is less than 0, then the linestyle specified
- in ``contour.negative_linestyle`` in ``matplotlibrc``
- will be used.
-
-contourf-only keyword arguments:
-
- *antialiased*: [ True | False ]
- enable antialiasing
-
- *nchunk*: [ 0 | integer ]
- If 0, no subdivision of the domain. Specify a positive integer to
- divide the domain into subdomains of roughly *nchunk* by *nchunk*
- points. This may never actually be advantageous, so this option may
- be removed. Chunking introduces artifacts at the chunk boundaries
- unless *antialiased* is *False*.
-
-**Example:**
-
-.. plot:: mpl_examples/pylab_examples/contour_demo.py
-
-Additional kwargs: hold = [True|False] overrides default hold state
-"""
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
@@ -2881,172 +1860,12 @@
ax.hold(washold)
if ret._A is not None: gci._current = ret
return ret
+if Axes.contour.__doc__ is not None:
+ contour.__doc__ = dedent(Axes.contour.__doc__) + __docstring_addendum
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def contourf(*args, **kwargs):
- """:func:`~matplotlib.pyplot.contour` and
-:func:`~matplotlib.pyplot.contourf` draw contour lines and
-filled contours, respectively. Except as noted, function
-signatures and return values are the same for both versions.
-
-:func:`~matplotlib.pyplot.contourf` differs from the Matlab
-(TM) version in that it does not draw the polygon edges,
-because the contouring engine yields simply connected regions
-with branch cuts. To draw the edges, add line contours with
-calls to :func:`~matplotlib.pyplot.contour`.
-
-
-call signatures::
-
- contour(Z)
-
-make a contour plot of an array *Z*. The level values are chosen
-automatically.
-
-::
-
- contour(X,Y,Z)
-
-*X*, *Y* specify the (*x*, *y*) coordinates of the surface
-
-::
-
- contour(Z,N)
- contour(X,Y,Z,N)
-
-contour *N* automatically-chosen levels.
-
-::
-
- contour(Z,V)
- contour(X,Y,Z,V)
-
-draw contour lines at the values specified in sequence *V*
-
-::
-
- contourf(..., V)
-
-fill the (len(*V*)-1) regions between the values in *V*
-
-::
-
- contour(Z, **kwargs)
-
-Use keyword args to control colors, linewidth, origin, cmap ... see
-below for more details.
-
-*X*, *Y*, and *Z* must be arrays with the same dimensions.
-
-*Z* may be a masked array, but filled contouring may not
-handle internal masked regions correctly.
-
-``C = contour(...)`` returns a
-:class:`~matplotlib.contour.ContourSet` object.
-
-Optional keyword arguments:
-
- *colors*: [ None | string | (mpl_colors) ]
- If *None*, the colormap specified by cmap will be used.
-
- If a string, like 'r' or 'red', all levels will be plotted in this
- color.
-
- If a tuple of matplotlib color args (string, float, rgb, etc),
- different levels will be plotted in different colors in the order
- specified.
-
- *alpha*: float
- The alpha blending value
-
- *cmap*: [ None | Colormap ]
- A cm :class:`~matplotlib.cm.Colormap` instance or
- *None*. If *cmap* is *None* and *colors* is *None*, a
- default Colormap is used.
-
- *norm*: [ None | Normalize ]
- A :class:`matplotlib.colors.Normalize` instance for
- scaling data values to colors. If *norm* is *None* and
- *colors* is *None*, the default linear scaling is used.
-
- *origin*: [ None | 'upper' | 'lower' | 'image' ]
- If *None*, the first value of *Z* will correspond to the
- lower left corner, location (0,0). If 'image', the rc
- value for ``image.origin`` will be used.
-
- This keyword is not active if *X* and *Y* are specified in
- the call to contour.
-
- *extent*: [ None | (x0,x1,y0,y1) ]
-
- If *origin* is not *None*, then *extent* is interpreted as
- in :func:`matplotlib.pyplot.imshow`: it gives the outer
- pixel boundaries. In this case, the position of Z[0,0]
- is the center of the pixel, not a corner. If *origin* is
- *None*, then (*x0*, *y0*) is the position of Z[0,0], and
- (*x1*, *y1*) is the position of Z[-1,-1].
-
- This keyword is not active if *X* and *Y* are specified in
- the call to contour.
-
- *locator*: [ None | ticker.Locator subclass ]
- If *locator* is None, the default
- :class:`~matplotlib.ticker.MaxNLocator` is used. The
- locator is used to determine the contour levels if they
- are not given explicitly via the *V* argument.
-
- *extend*: [ 'neither' | 'both' | 'min' | 'max' ]
- Unless this is 'neither', contour levels are automatically
- added to one or both ends of the range so that all data
- are included. These added ranges are then mapped to the
- special colormap values which default to the ends of the
- colormap range, but can be set via
- :meth:`matplotlib.cm.Colormap.set_under` and
- :meth:`matplotlib.cm.Colormap.set_over` methods.
-
-contour-only keyword arguments:
-
- *linewidths*: [ None | number | tuple of numbers ]
- If *linewidths* is *None*, the default width in
- ``lines.linewidth`` in ``matplotlibrc`` is used.
-
- If a number, all levels will be plotted with this linewidth.
-
- If a tuple, different levels will be plotted with different
- linewidths in the order specified
-
- *linestyles*: [None | 'solid' | 'dashed' | 'dashdot' | 'dotted' ]
- If *linestyles* is *None*, the 'solid' is used.
-
- *linestyles* can also be an iterable of the above strings
- specifying a set of linestyles to be used. If this
- iterable is shorter than the number of contour levels
- it will be repeated as necessary.
-
- If contour is using a monochrome colormap and the contour
- level is less than 0, then the linestyle specified
- in ``contour.negative_linestyle`` in ``matplotlibrc``
- will be used.
-
-contourf-only keyword arguments:
-
- *antialiased*: [ True | False ]
- enable antialiasing
-
- *nchunk*: [ 0 | integer ]
- If 0, no subdivision of the domain. Specify a positive integer to
- divide the domain into subdomains of roughly *nchunk* by *nchunk*
- points. This may never actually be advantageous, so this option may
- be removed. Chunking introduces artifacts at the chunk boundaries
- unless *antialiased* is *False*.
-
-**Example:**
-
-.. plot:: mpl_examples/pylab_examples/contour_demo.py
-
-Additional kwargs: hold = [True|False] overrides default hold state
-"""
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
@@ -3060,148 +1879,12 @@
ax.hold(washold)
if ret._A is not None: gci._current = ret
return ret
+if Axes.contourf.__doc__ is not None:
+ contourf.__doc__ = dedent(Axes.contourf.__doc__) + __docstring_addendum
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def csd(x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=0, pad_to=None, sides='default', scale_by_freq=None, hold=None, **kwargs):
- """call signature::
-
- csd(x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
- window=mlab.window_hanning, noverlap=0, pad_to=None,
- sides='default', scale_by_freq=None, **kwargs)
-
-The cross spectral density :math:`P_{xy}` by Welch's average
-periodogram method. The vectors *x* and *y* are divided into
-*NFFT* length segments. Each segment is detrended by function
-*detrend* and windowed by function *window*. The product of
-the direct FFTs of *x* and *y* are averaged over each segment
-to compute :math:`P_{xy}`, with a scaling to correct for power
-loss due to windowing.
-
-Returns the tuple (*Pxy*, *freqs*). *P* is the cross spectrum
-(complex valued), and :math:`10\\log_{10}|P_{xy}|` is
-plotted.
-
-Keyword arguments:
-
- *NFFT*: integer
- The number of data points used in each block for the FFT.
- Must be even; a power 2 is most efficient. The default value is 256.
-
- *Fs*: scalar
- The sampling frequency (samples per time unit). It is used
- to calculate the Fourier frequencies, freqs, in cycles per time
- unit. The default value is 2.
-
- *detrend*: callable
- The function applied to each segment before fft-ing,
- designed to remove the mean or linear trend. Unlike in
- matlab, where the *detrend* parameter is a vector, in
- matplotlib is it a function. The :mod:`~matplotlib.pylab`
- module defines :func:`~matplotlib.pylab.detrend_none`,
- :func:`~matplotlib.pylab.detrend_mean`, and
- :func:`~matplotlib.pylab.detrend_linear`, but you can use
- a custom function as well.
-
- *window*: callable or ndarray
- A function or a vector of length *NFFT*. To create window
- vectors see :func:`window_hanning`, :func:`window_none`,
- :func:`numpy.blackman`, :func:`numpy.hamming`,
- :func:`numpy.bartlett`, :func:`scipy.signal`,
- :func:`scipy.signal.get_window`, etc. The default is
- :func:`window_hanning`. If a function is passed as the
- argument, it must take a data segment as an argument and
- return the windowed version of the segment.
-
- *noverlap*: integer
- The number of points of overlap between blocks. The default value
- is 0 (no overlap).
-
- *pad_to*: integer
- The number of points to which the data segment is padded when
- performing the FFT. This can be different from *NFFT*, which
- specifies the number of data points used. While not increasing
- the actual resolution of the psd (the minimum distance between
- resolvable peaks), this can give more points in the plot,
- allowing for more detail. This corresponds to the *n* parameter
- in the call to fft(). The default is None, which sets *pad_to*
- equal to *NFFT*
-
- *sides*: [ 'default' | 'onesided' | 'twosided' ]
- Specifies which sides of the PSD to return. Default gives the
- default behavior, which returns one-sided for real data and both
- for complex data. 'onesided' forces the return of a one-sided PSD,
- while 'twosided' forces two-sided.
-
- *scale_by_freq*: boolean
- Specifies whether the resulting density values should be scaled
- by the scaling frequency, which gives density in units of Hz^-1.
- This allows for integration over the returned frequency values.
- The default is True for MatLab compatibility.
-
- *Fc*: integer
- The center frequency of *x* (defaults to 0), which offsets
- the x extents of the plot to reflect the frequency range used
- when a signal is acquired and then filtered and downsampled to
- baseband.
-
-References:
- Bendat & Piersol -- Random Data: Analysis and Measurement
- Procedures, John Wiley & Sons (1986)
-
-kwargs control the Line2D properties:
-
- alpha: float (0.0 transparent through 1.0 opaque)
- animated: [True | False]
- antialiased or aa: [True | False]
- axes: an :class:`~matplotlib.axes.Axes` instance
- clip_box: a :class:`matplotlib.transforms.Bbox` instance
- clip_on: [True | False]
- clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ]
- color or c: any matplotlib color
- contains: a callable function
- dash_capstyle: ['butt' | 'round' | 'projecting']
- dash_joinstyle: ['miter' | 'round' | 'bevel']
- dashes: sequence of on/off ink in points
- data: 2D array
- drawstyle: [ 'default' | 'steps' | 'steps-pre' | 'steps-mid' | 'steps-post' ]
- figure: a :class:`matplotlib.figure.Figure` instance
- fillstyle: ['full' | 'left' | 'right' | 'bottom' | 'top']
- gid: an id string
- label: any string
- linestyle or ls: [ '-' | '--' | '-.' | ':' | 'None' | ' ' | '' ] and any drawstyle in combination with a linestyle, e.g. 'steps--'.
- linewidth or lw: float value in points
- lod: [True | False]
- marker: [ '+' | '*' | ',' | '.' | '1' | '2' | '3' | '4' | '<' | '>' | 'D' | 'H' | '^' | '_' | 'd' | 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|' | TICKUP | TICKDOWN | TICKLEFT | TICKRIGHT | 'None' | ' ' | '' ]
- markeredgecolor or mec: any matplotlib color
- markeredgewidth or mew: float value in points
- markerfacecolor or mfc: any matplotlib color
- markersize or ms: float
- markevery: None | integer | (startind, stride)
- picker: float distance in points or callable pick function ``fn(artist, event)``
- pickradius: float distance in points
- rasterized: [True | False | None]
- snap: unknown
- solid_capstyle: ['butt' | 'round' | 'projecting']
- solid_joinstyle: ['miter' | 'round' | 'be...
[truncated message content] |