Skip to content

Loading…

DOC improves documentation on the pyplot module and the bar method #1757

Merged
merged 1 commit into from

5 participants

@NelleV

This patch contains some MEP10 documentation improvements on the bar's method, and some small PEP8 fixes on the pyplot module.

Thanks,
N

@pelson
Matplotlib Developers member

some small PEP8 fixes on the pyplot module

FWIW #1760 fixes some of the whitespace issues not addressed in this PR (so no conflicts :smile: )

@pelson pelson commented on the diff
lib/matplotlib/axes.py
((12 lines not shown))
(left, right, bottom and top edges)
- *left*, *height*, *width*, and *bottom* can be either scalars
- or sequences
+ Parameters
+ ----------
+ left : sequence of scalars
@pelson Matplotlib Developers member
pelson added a note

Sequence or scalars? Or was that intentional? It's no longer clear that scalars may be given.

@NelleV
NelleV added a note

That was intentional, but that because I forgot the case of the horizontal bar plot, where one may want to pass a scalar here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@pelson pelson commented on an outdated diff
lib/matplotlib/axes.py
((42 lines not shown))
- =============== ==========================================
- Keyword Description
@pelson Matplotlib Developers member
pelson added a note

Is the table form for keywords out? @WeatherGod - I know you have put a lot of effort into docs, just wanted to check with you about this.

@NelleV
NelleV added a note

Now that we are using numpydocs, I don't think the parameters should be specify in a table anymore. It is quite hard to read when using the help method in a python interactive interpreter and numpydoc provides nice formatting for those.

@WeatherGod Matplotlib Developers member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@mdboom
Matplotlib Developers member

Looks good to me. Glad to have MEP10 rolling in.

@dmcdougall dmcdougall commented on an outdated diff
lib/matplotlib/axes.py
((72 lines not shown))
- 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.
+ linewidth : scalar or sequence of scalar, optional, default: None
@dmcdougall Matplotlib Developers member

Missing an 's': scalar or sequence of scalars

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@dmcdougall dmcdougall commented on an outdated diff
lib/matplotlib/axes.py
((82 lines not shown))
- The optional arguments *color*, *edgecolor*, *linewidth*,
- *xerr*, and *yerr* can be either scalars or sequences of
+ 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
@dmcdougall Matplotlib Developers member

Any errorbar? Or all errorbars?

@NelleV
NelleV added a note

I changed to specifies the color or errorbar(s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@dmcdougall
Matplotlib Developers member

Is it possible to restart this Travis job? The option is greyed out for me.

@NelleV

@dmcdougall I've rebased. This should restart travis.

@pelson pelson merged commit eb59a06 into matplotlib:master

1 check passed

Details default The Travis build passed
@pelson
Matplotlib Developers member

Good work @NelleV (again)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 169 additions and 137 deletions.
  1. +56 −57 lib/matplotlib/axes.py
  2. +113 −80 lib/matplotlib/pyplot.py
View
113 lib/matplotlib/axes.py
@@ -837,8 +837,7 @@ def _gen_axes_spines(self, locations=None, offset=0.0, units='inches'):
'left': mspines.Spine.linear_spine(self, 'left'),
'right': mspines.Spine.linear_spine(self, 'right'),
'bottom': mspines.Spine.linear_spine(self, 'bottom'),
- 'top': mspines.Spine.linear_spine(self, 'top'),
- }
+ 'top': mspines.Spine.linear_spine(self, 'top'), }
def cla(self):
"""Clear the current axes."""
@@ -936,8 +935,7 @@ def cla(self):
x=0.0, y=1.0, text='',
fontproperties=props,
verticalalignment='baseline',
- horizontalalignment='left',
- )
+ horizontalalignment='left', )
self._right_title = mtext.Text(
x=1.0, y=1.0, text='',
fontproperties=props,
@@ -4819,72 +4817,73 @@ def bar(self, left, height, width=0.8, bottom=None, **kwargs):
"""
Make a bar plot.
- Call signature::
-
- bar(left, height, width=0.8, bottom=0, **kwargs)
-
Make a bar plot with rectangles bounded by:
- *left*, *left* + *width*, *bottom*, *bottom* + *height*
+ `left`, `left` + `width`, `bottom`, `bottom` + `height`
(left, right, bottom and top edges)
- *left*, *height*, *width*, and *bottom* can be either scalars
- or sequences
+ Parameters
+ ----------
+ left : sequence of scalars
@pelson Matplotlib Developers member
pelson added a note

Sequence or scalars? Or was that intentional? It's no longer clear that scalars may be given.

@NelleV
NelleV added a note

That was intentional, but that because I forgot the case of the horizontal bar plot, where one may want to pass a scalar here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ the x coordinates of the left sides of the bars
- Return value is a list of
- :class:`matplotlib.patches.Rectangle` instances.
+ height : sequence of scalars
+ the heights of the bars
- Required arguments:
+ width : scalar or array-like, optional, default: 0.8
+ the width(s) of the bars
- ======== ===============================================
- Argument Description
- ======== ===============================================
- *left* the x coordinates of the left sides of the bars
- *height* the heights of the bars
- ======== ===============================================
+ bottom : scalar or array-like, optional, default: None
+ the y coordinate(s) of the bars
- Optional keyword arguments:
+ color : scalar or array-like, optional
+ the colors of the bars
- =============== ==========================================
- 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
- *error_kw* dictionary of kwargs to be passed to
- errorbar method. *ecolor* and *capsize*
- may be specified here rather than as
- independent kwargs.
- *align* 'edge' (default) | 'center'
- *orientation* 'vertical' | 'horizontal'
- *log* [False|True] False (default) leaves the
- orientation axis as-is; True sets it to
- log scale
- =============== ==========================================
+ edgecolor : scalar or array-like, optional
+ the colors of the bar edges
- 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.
+ linewidth : scalar or array-like, optional, default: None
+ width of bar edge(s). If None, use default
+ linewidth; If 0, don't draw edges.
- The optional arguments *color*, *edgecolor*, *linewidth*,
- *xerr*, and *yerr* can be either scalars or sequences of
+ xerr : scalar or array-like, optional, default: None
+ if not None, will be used to generate errorbar(s) on the bar chart
+
+ yerr :scalar or array-like, optional, default: None
+ if not None, will be used to generate errorbar(s) on the bar chart
+
+ ecolor : scalar or array-like, optional, default: None
+ specifies the color of errorbar(s)
+
+ capsize : integer, optional, default: 3
+ determines the length in points of the error bar caps
+
+ error_kw :
+ dictionary of kwargs to be passed to errorbar method. *ecolor* and
+ *capsize* may be specified here rather than as independent kwargs.
+
+ align : ['edge' | 'center'], optional, default: 'edge'
+ If `edge`, aligns bars by their left edges (for vertical bars) and
+ by their bottom edges (for horizontal bars). If `center`, interpret
+ the `left` argument as the coordinates of the centers of the bars.
+
+ orientation : 'vertical' | 'horizontal', optional, default: 'vertical'
+ The orientation of the bars.
+
+ log : boolean, optional, default: False
+ If true, sets the axis to be log scale
+
+ Returns
+ -------
+ :class:`matplotlib.patches.Rectangle` instances.
+
+ Note
+ ----
+ 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.
- Detail: *xerr* and *yerr* are passed directly to
+ Detail: `xerr` and `yerr` are passed directly to
:meth:`errorbar`, so they can also have shape 2xN for
independent specification of lower and upper errors.
View
193 lib/matplotlib/pyplot.py
@@ -1,5 +1,5 @@
-# Note: The first part of this file can be modified in place, but the latter part
-# is autogenerated by the boilerplate.py script.
+# Note: The first part of this file can be modified in place, but the latter
+# part is autogenerated by the boilerplate.py script.
"""
Provides a MATLAB-like plotting framework.
@@ -17,7 +17,8 @@
"""
from __future__ import print_function
-import sys, warnings
+import sys
+import warnings
import matplotlib
from matplotlib import _pylab_helpers, interactive
@@ -43,7 +44,8 @@
import numpy as np
# We may not need the following imports here:
-from matplotlib.colors import Normalize, normalize # latter for backwards compat.
+from matplotlib.colors import Normalize
+from matplotlib.colors import normalize # for backwards compat.
from matplotlib.lines import Line2D
from matplotlib.text import Text, Annotation
from matplotlib.patches import Polygon, Rectangle, Circle, Arrow
@@ -56,6 +58,7 @@
LinearLocator, LogLocator, AutoLocator, MultipleLocator,\
MaxNLocator
+
## Backend detection ##
def _backend_selection():
""" If rcParams['backend_fallback'] is true, check to see if the
@@ -87,8 +90,8 @@ def _backend_selection():
if gobject.MainLoop().is_running():
rcParams['backend'] = 'gtk' + 'Agg' * is_agg_backend
elif 'Tkinter' in sys.modules and not backend == 'TkAgg':
- #import Tkinter
- pass #what if anything do we need to do for tkinter?
+ # import Tkinter
+ pass # what if anything do we need to do for tkinter?
_backend_selection()
@@ -97,6 +100,7 @@ def _backend_selection():
from matplotlib.backends import pylab_setup
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
+
@docstring.copy_dedent(Artist.findobj)
def findobj(o=None, match=None):
if o is None:
@@ -150,14 +154,17 @@ def isinteractive():
"""
return matplotlib.is_interactive()
+
def ioff():
'Turn interactive mode off.'
matplotlib.interactive(False)
+
def ion():
'Turn interactive mode on.'
matplotlib.interactive(True)
+
def pause(interval):
"""
Pause for *interval* seconds.
@@ -190,15 +197,16 @@ def pause(interval):
time.sleep(interval)
-
@docstring.copy_dedent(matplotlib.rc)
def rc(*args, **kwargs):
matplotlib.rc(*args, **kwargs)
+
@docstring.copy_dedent(matplotlib.rc_context)
def rc_context(rc=None, fname=None):
matplotlib.rc_context(rc, fname)
+
@docstring.copy_dedent(matplotlib.rcdefaults)
def rcdefaults():
matplotlib.rcdefaults()
@@ -208,6 +216,7 @@ def rcdefaults():
# only via the pyplot interface using the following two
# functions:
+
def gci():
"""
Get the current colorable artist. Specifically, returns the
@@ -224,6 +233,7 @@ def gci():
"""
return gcf()._gci()
+
def sci(im):
"""
Set the current image. This image will be the target of colormap
@@ -245,77 +255,74 @@ def setp(*args, **kwargs):
draw_if_interactive()
return ret
-
-
-
## Figures ##
-
-def figure(num=None, # autoincrement if None, else integer from 1-N
- figsize = None, # defaults to rc figure.figsize
- dpi = None, # defaults to rc figure.dpi
- facecolor = None, # defaults to rc figure.facecolor
- edgecolor = None, # defaults to rc figure.edgecolor
- frameon = True,
- FigureClass = Figure,
+def figure(num=None, # autoincrement if None, else integer from 1-N
+ figsize=None, # defaults to rc figure.figsize
+ dpi=None, # defaults to rc figure.dpi
+ facecolor=None, # defaults to rc figure.facecolor
+ edgecolor=None, # defaults to rc figure.edgecolor
+ frameon=True,
+ FigureClass=Figure,
**kwargs
):
"""
- Create a new figure.
+ Creates a new figure.
- call signature::
-
- figure(num=None, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k')
-
- Create a new figure and return a :class:`matplotlib.figure.Figure`
- instance. If *num* = *None*, the figure number will be incremented and
- a new figure will be created. The returned figure objects have a
- *number* attribute holding this number.
+ Parameters
+ ----------
- If *num* is an integer, and ``figure(num)`` already exists, make it
- active and return a reference to it. If ``figure(num)`` does not exist
- it will be created. Numbering starts at 1, MATLAB style::
+ num : integer or string, optional, default: none
+ If not provided, a new figure will be created, and a the figure number
+ will be increamted. The figure objects holds this number in a `number`
+ attribute.
+ If num is provided, and a figure with this id already exists, make
+ it active, and returns a reference to it. If this figure does not
+ exists, create it and returns it.
+ If num is a string, the window title will be set to this figure's
+ `num`.
- figure(1)
+ figsize : tuple of integers, optional, default : None
+ width, height in inches. If not provided, defaults to rc
+ figure.figsize.
- The same applies if *num* is a string. In this case *num* will be used
- as an explicit figure label::
+ dpi : integer, optional, default ; None
+ resolution of the figure. If not provided, defaults to rc figure.dpi.
- figure("today")
+ facecolor :
+ the background color; If not provided, defaults to rc figure.facecolor
- and in windowed backends, the window title will be set to this figure
- label.
+ edgecolor :
+ the border color. If not provided, defaults to rc figure.edgecolor
+ Returns
+ -------
+ figure : Figure
+ The Figure instance returned will also be passed to new_figure_manager
+ in the backends, which allows to hook custom Figure classes into the
+ pylab interface. Additional kwargs will be passed to the figure init
+ function.
+
+ Note
+ ----
If you are creating many figures, make sure you explicitly call "close"
on the figures you are not using, because this will enable pylab
to properly clean up the memory.
- Optional keyword arguments:
-
- ========= =======================================================
- Keyword Description
- ========= =======================================================
- figsize width x height in inches; defaults to rc figure.figsize
- dpi resolution; defaults to rc figure.dpi
- facecolor the background color; defaults to rc figure.facecolor
- edgecolor the border color; defaults to rc figure.edgecolor
- ========= =======================================================
-
rcParams defines the default values, which can be modified in the
matplotlibrc file
- *FigureClass* is a :class:`~matplotlib.figure.Figure` or derived
- class that will be passed on to :meth:`new_figure_manager` in the
- backends which allows you to hook custom Figure classes into the
- pylab interface. Additional kwargs will be passed on to your
- figure init function.
"""
- if figsize is None : figsize = rcParams['figure.figsize']
- if dpi is None : dpi = rcParams['figure.dpi']
- if facecolor is None : facecolor = rcParams['figure.facecolor']
- if edgecolor is None : edgecolor = rcParams['figure.edgecolor']
+ if figsize is None:
+ figsize = rcParams['figure.figsize']
+ if dpi is None:
+ dpi = rcParams['figure.dpi']
+ if facecolor is None:
+ facecolor = rcParams['figure.facecolor']
+ if edgecolor is None:
+ edgecolor = rcParams['figure.edgecolor']
allnums = get_fignums()
next_num = max(allnums) + 1 if allnums else 1
@@ -337,15 +344,16 @@ class that will be passed on to :meth:`new_figure_manager` in the
figManager = _pylab_helpers.Gcf.get_fig_manager(num)
if figManager is None:
- if get_backend().lower() == 'ps': dpi = 72
+ if get_backend().lower() == 'ps':
+ dpi = 72
figManager = new_figure_manager(num, figsize=figsize,
- dpi=dpi,
- facecolor=facecolor,
- edgecolor=edgecolor,
- frameon=frameon,
- FigureClass=FigureClass,
- **kwargs)
+ dpi=dpi,
+ facecolor=facecolor,
+ edgecolor=edgecolor,
+ frameon=frameon,
+ FigureClass=FigureClass,
+ **kwargs)
if figLabel:
figManager.set_window_title(figLabel)
@@ -376,18 +384,21 @@ def gcf():
fignum_exists = _pylab_helpers.Gcf.has_fignum
+
def get_fignums():
- "Return a list of existing figure numbers."
+ """Return a list of existing figure numbers."""
fignums = _pylab_helpers.Gcf.figs.keys()
fignums.sort()
return fignums
+
def get_figlabels():
"Return a list of existing figure labels."
figManagers = _pylab_helpers.Gcf.get_all_fig_managers()
figManagers.sort(key=lambda m: m.num)
return [m.canvas.figure.get_label() for m in figManagers]
+
def get_current_fig_manager():
figManager = _pylab_helpers.Gcf.get_active()
if figManager is None:
@@ -395,14 +406,17 @@ def get_current_fig_manager():
figManager = _pylab_helpers.Gcf.get_active()
return figManager
+
@docstring.copy_dedent(FigureCanvasBase.mpl_connect)
def connect(s, func):
return get_current_fig_manager().canvas.mpl_connect(s, func)
+
@docstring.copy_dedent(FigureCanvasBase.mpl_disconnect)
def disconnect(cid):
return get_current_fig_manager().canvas.mpl_disconnect(cid)
+
def close(*args):
"""
Close a figure window.
@@ -418,14 +432,15 @@ def close(*args):
``close('all')`` closes all the figure windows
"""
- if len(args)==0:
+ if len(args) == 0:
figManager = _pylab_helpers.Gcf.get_active()
- if figManager is None: return
+ if figManager is None:
+ return
else:
_pylab_helpers.Gcf.destroy(figManager.num)
- elif len(args)==1:
+ elif len(args) == 1:
arg = args[0]
- if arg=='all':
+ if arg == 'all':
_pylab_helpers.Gcf.destroy_all()
elif isinstance(arg, int):
_pylab_helpers.Gcf.destroy(arg)
@@ -437,7 +452,7 @@ def close(*args):
elif isinstance(arg, Figure):
_pylab_helpers.Gcf.destroy_fig(arg)
else:
- raise TypeError('Unrecognized argument type %s to close'%type(arg))
+ raise TypeError('Unrecognized argument type %s to close' % type(arg))
else:
raise TypeError('close takes 0 or 1 arguments')
@@ -449,6 +464,7 @@ def clf():
gcf().clf()
draw_if_interactive()
+
def draw():
"""
Redraw the current figure.
@@ -471,11 +487,13 @@ def draw():
"""
get_current_fig_manager().canvas.draw()
+
@docstring.copy_dedent(Figure.savefig)
def savefig(*args, **kwargs):
fig = gcf()
return fig.savefig(*args, **kwargs)
+
@docstring.copy_dedent(Figure.ginput)
def ginput(*args, **kwargs):
"""
@@ -488,6 +506,7 @@ def ginput(*args, **kwargs):
"""
return gcf().ginput(*args, **kwargs)
+
@docstring.copy_dedent(Figure.waitforbuttonpress)
def waitforbuttonpress(*args, **kwargs):
"""
@@ -511,12 +530,14 @@ def figtext(*args, **kwargs):
draw_if_interactive()
return ret
+
@docstring.copy_dedent(Figure.suptitle)
def suptitle(*args, **kwargs):
ret = gcf().suptitle(*args, **kwargs)
draw_if_interactive()
return ret
+
@docstring.Appender("Addition kwargs: hold = [True|False] overrides default hold state", "\n")
@docstring.copy_dedent(Figure.figimage)
def figimage(*args, **kwargs):
@@ -526,6 +547,7 @@ def figimage(*args, **kwargs):
#sci(ret) # JDH figimage should not set current image -- it is not mappable, etc
return ret
+
def figlegend(handles, labels, loc, **kwargs):
"""
Place a legend in the figure.
@@ -559,7 +581,6 @@ def figlegend(handles, labels, loc, **kwargs):
return l
-
## Figure and Axes hybrid ##
def hold(b=None):
@@ -589,12 +610,14 @@ def hold(b=None):
rc('axes', hold=b)
+
def ishold():
"""
Return the hold status of the current axes.
"""
return gca().ishold()
+
def over(func, *args, **kwargs):
"""
Call a function with hold(True).
@@ -610,10 +633,9 @@ def over(func, *args, **kwargs):
func(*args, **kwargs)
hold(h)
-
-
## Axes ##
+
def axes(*args, **kwargs):
"""
Add an axes to the figure.
@@ -661,6 +683,7 @@ def axes(*args, **kwargs):
draw_if_interactive()
return a
+
def delaxes(*args):
"""
Remove an axes from the current figure. If *ax*
@@ -676,6 +699,7 @@ def delaxes(*args):
draw_if_interactive()
return ret
+
def sca(ax):
"""
Set the current Axes instance to *ax*.
@@ -1094,7 +1118,6 @@ def twiny(ax=None):
return ax1
-
def subplots_adjust(*args, **kwargs):
"""
Tune the subplot layout.
@@ -1145,7 +1168,6 @@ def subplot_tool(targetfig=None):
return ret
-
def tight_layout(pad=1.08, h_pad=None, w_pad=None, rect=None):
"""
Automatically adjust subplot parameters to give specified padding.
@@ -1168,7 +1190,6 @@ def tight_layout(pad=1.08, h_pad=None, w_pad=None, rect=None):
draw_if_interactive()
-
def box(on=None):
"""
Turn the axes box on or off. *on* may be a boolean or a string,
@@ -1227,9 +1248,9 @@ def title(s, *args, **kwargs):
draw_if_interactive()
return l
-
## Axis ##
+
def axis(*v, **kwargs):
"""
Set or get the axis properties.::
@@ -1293,6 +1314,7 @@ def axis(*v, **kwargs):
draw_if_interactive()
return v
+
def xlabel(s, *args, **kwargs):
"""
Set the *x* axis label of the current axis.
@@ -1314,6 +1336,7 @@ def xlabel(s, *args, **kwargs):
draw_if_interactive()
return l
+
def ylabel(s, *args, **kwargs):
"""
Set the *y* axis label of the current axis.
@@ -1337,9 +1360,6 @@ def ylabel(s, *args, **kwargs):
return l
-
-
-
def xlim(*args, **kwargs):
"""
Get or set the *x* limits of the current axes.
@@ -1416,6 +1436,7 @@ def xscale(*args, **kwargs):
ax.set_xscale(*args, **kwargs)
draw_if_interactive()
+
@docstring.dedent_interpd
def yscale(*args, **kwargs):
"""
@@ -1435,6 +1456,7 @@ def yscale(*args, **kwargs):
ax.set_yscale(*args, **kwargs)
draw_if_interactive()
+
def xticks(*args, **kwargs):
"""
Get or set the *x*-limits of the current tick locations and labels.
@@ -1475,6 +1497,7 @@ def xticks(*args, **kwargs):
draw_if_interactive()
return locs, silent_list('Text xticklabel', labels)
+
def yticks(*args, **kwargs):
"""
Get or set the *y*-limits of the current tick locations and labels.
@@ -1518,6 +1541,7 @@ def yticks(*args, **kwargs):
silent_list('Text yticklabel', labels)
)
+
def minorticks_on():
"""
Display minor ticks on the current plot.
@@ -1528,6 +1552,7 @@ def minorticks_on():
gca().minorticks_on()
draw_if_interactive()
+
def minorticks_off():
"""
Remove minor ticks from the current plot.
@@ -1535,6 +1560,7 @@ def minorticks_off():
gca().minorticks_off()
draw_if_interactive()
+
def rgrids(*args, **kwargs):
"""
Get or set the radial gridlines on a polar plot.
@@ -1579,6 +1605,7 @@ def rgrids(*args, **kwargs):
return ( silent_list('Line2D rgridline', lines),
silent_list('Text rgridlabel', labels) )
+
def thetagrids(*args, **kwargs):
"""
Get or set the theta locations of the gridlines in a polar plot.
@@ -1724,7 +1751,6 @@ def colors():
pass
-
def colormaps():
"""
Matplotlib provides a number of colormaps, and others can be added using
@@ -2032,6 +2058,7 @@ def colorbar(mappable=None, cax=None, ax=None, **kw):
return ret
colorbar.__doc__ = matplotlib.colorbar.colorbar_doc
+
def clim(vmin=None, vmax=None):
"""
Set the color limits of the current image.
@@ -2057,6 +2084,7 @@ def clim(vmin=None, vmax=None):
im.set_clim(vmin, vmax)
draw_if_interactive()
+
def set_cmap(cmap):
'''
Set the default colormap. Applies to the current image if any.
@@ -2082,10 +2110,12 @@ def set_cmap(cmap):
def imread(*args, **kwargs):
return _imread(*args, **kwargs)
+
@docstring.copy_dedent(_imsave)
def imsave(*args, **kwargs):
return _imsave(*args, **kwargs)
+
def matshow(A, fignum=None, **kw):
"""
Display an array as a matrix in a new figure window.
@@ -2127,6 +2157,7 @@ def matshow(A, fignum=None, **kw):
draw_if_interactive()
return im
+
def polar(*args, **kwargs):
"""
Make a polar plot.
@@ -2144,6 +2175,7 @@ def polar(*args, **kwargs):
draw_if_interactive()
return ret
+
def plotfile(fname, cols=(0,), plotfuncs=None,
comments='#', skiprows=0, checkrows=5, delimiter=',', names=None,
subplots=True, newfig=True, **kwargs):
@@ -2264,6 +2296,7 @@ def getname_val(identifier):
draw_if_interactive()
+
def _autogen_docstring(base):
"""Autogenerated wrappers will get their docstring from a base function
with an addendum."""
Something went wrong with that request. Please try again.