From: <ef...@us...> - 2009-08-15 23:05:58
|
Revision: 7495 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7495&view=rev Author: efiring Date: 2009-08-15 23:05:52 +0000 (Sat, 15 Aug 2009) Log Message: ----------- Small changes to bar kwarg handling in response to 1200213 Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/pyplot.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2009-08-15 21:24:01 UTC (rev 7494) +++ trunk/matplotlib/lib/matplotlib/axes.py 2009-08-15 23:05:52 UTC (rev 7495) @@ -4076,19 +4076,11 @@ @docstring.dedent_interpd - def bar(self, left, height, width=0.8, bottom=None, - color=None, edgecolor=None, linewidth=None, - yerr=None, xerr=None, ecolor=None, capsize=3, - align='edge', orientation='vertical', log=False, - **kwargs - ): + def bar(self, left, height, width=0.8, bottom=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) + bar(left, height, width=0.8, bottom=0, **kwargs) Make a bar plot with rectangles bounded by: @@ -4157,7 +4149,16 @@ .. plot:: mpl_examples/pylab_examples/bar_stacked.py """ if not self._hold: self.cla() - + color = kwargs.pop('color', None) + edgecolor = kwargs.pop('edgecolor', None) + linewidth = kwargs.pop('linewidth', None) + xerr = kwargs.pop('xerr', None) + yerr = kwargs.pop('yerr', None) + ecolor = kwargs.pop('ecolor', None) + capsize = kwargs.pop('capsize', 3) + align = kwargs.pop('align', 'edge') + orientation = kwargs.pop('orientation', 'vertical') + log = kwargs.pop('log', False) label = kwargs.pop('label', '') def make_iterable(x): if not iterable(x): Modified: trunk/matplotlib/lib/matplotlib/pyplot.py =================================================================== --- trunk/matplotlib/lib/matplotlib/pyplot.py 2009-08-15 21:24:01 UTC (rev 7494) +++ trunk/matplotlib/lib/matplotlib/pyplot.py 2009-08-15 23:05:52 UTC (rev 7495) @@ -1713,7 +1713,7 @@ # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.bar) -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): +def bar(left, height, width=0.80000000000000004, bottom=None, hold=None, **kwargs): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -1721,7 +1721,7 @@ if hold is not None: ax.hold(hold) try: - ret = ax.bar(left, height, width, bottom, color, edgecolor, linewidth, yerr, xerr, ecolor, capsize, align, orientation, log, **kwargs) + ret = ax.bar(left, height, width, bottom, **kwargs) draw_if_interactive() finally: ax.hold(washold) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |