diff --git a/boilerplate.py b/boilerplate.py index ecbf01607281..2426c0864b6f 100644 --- a/boilerplate.py +++ b/boilerplate.py @@ -21,6 +21,8 @@ import random import types +import textwrap + # import the local copy of matplotlib, not the installed one #sys.path.insert(0, './lib') from matplotlib.axes import Axes @@ -62,7 +64,7 @@ def %(func)s(%(argspec)s): MISC_FN_TEMPLATE = AUTOGEN_MSG + """ @docstring.copy_dedent(Axes.%(func)s) def %(func)s(%(argspec)s): - %(ret)s = gca().%(func)s(%(call)s) + %(ret)s = gca().%(func)s(%(call)s) draw_if_interactive() return %(ret)s """ @@ -189,6 +191,8 @@ def format_value(value): 'formatvalue') % value) return '='+repr(value) + text_wrapper = textwrap.TextWrapper(break_long_words=False) + for fmt, cmdlist in [(PLOT_TEMPLATE, _plotcommands), (MISC_FN_TEMPLATE, _misccommands)]: for func in cmdlist: @@ -206,13 +210,23 @@ def format_value(value): defaults = () # How to call the wrapped function - call = list(map(str, args)) + call = [] + for i, arg in enumerate(args): + if len(defaults) < len(args) - i: + call.append('%s' % arg) + else: + call.append('%s=%s' % (arg, arg)) + if varargs is not None: call.append('*'+varargs) if varkw is not None: call.append('**'+varkw) call = ', '.join(call) + text_wrapper.width = 80 - 19 - len(func) + join_with = '\n' + ' ' * (18 + len(func)) + call = join_with.join(text_wrapper.wrap(call)) + # Add a hold keyword argument if needed (fmt is PLOT_TEMPLATE) and # possible (if *args is used, we can't just add a hold # argument in front of it since it would gobble one of the @@ -229,6 +243,10 @@ def format_value(value): formatvalue=format_value) argspec = argspec[1:-1] # remove parens + text_wrapper.width = 80 - 5 - len(func) + join_with = '\n' + ' ' * (5 + len(func)) + argspec = join_with.join(text_wrapper.wrap(argspec)) + # A gensym-like facility in case some function takes an # argument named washold, ax, or ret washold, ret, ax = 'washold', 'ret', 'ax' diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index 8b9a205c3886..b083f1eda351 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -2273,7 +2273,7 @@ def axhline(y=0, xmin=0, xmax=1, hold=None, **kwargs): if hold is not None: ax.hold(hold) try: - ret = ax.axhline(y, xmin, xmax, **kwargs) + ret = ax.axhline(y=y, xmin=xmin, xmax=xmax, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2291,7 +2291,7 @@ def axhspan(ymin, ymax, xmin=0, xmax=1, hold=None, **kwargs): if hold is not None: ax.hold(hold) try: - ret = ax.axhspan(ymin, ymax, xmin, xmax, **kwargs) + ret = ax.axhspan(ymin, ymax, xmin=xmin, xmax=xmax, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2309,7 +2309,7 @@ def axvline(x=0, ymin=0, ymax=1, hold=None, **kwargs): if hold is not None: ax.hold(hold) try: - ret = ax.axvline(x, ymin, ymax, **kwargs) + ret = ax.axvline(x=x, ymin=ymin, ymax=ymax, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2327,7 +2327,7 @@ def axvspan(xmin, xmax, ymin=0, ymax=1, hold=None, **kwargs): if hold is not None: ax.hold(hold) try: - ret = ax.axvspan(xmin, xmax, ymin, ymax, **kwargs) + ret = ax.axvspan(xmin, xmax, ymin=ymin, ymax=ymax, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2345,7 +2345,7 @@ def bar(left, height, width=0.8, bottom=None, hold=None, **kwargs): if hold is not None: ax.hold(hold) try: - ret = ax.bar(left, height, width, bottom, **kwargs) + ret = ax.bar(left, height, width=width, bottom=bottom, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2363,7 +2363,7 @@ def barh(bottom, width, height=0.8, left=None, hold=None, **kwargs): if hold is not None: ax.hold(hold) try: - ret = ax.barh(bottom, width, height, left, **kwargs) + ret = ax.barh(bottom, width, height=height, left=left, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2391,7 +2391,8 @@ def broken_barh(xranges, yrange, hold=None, **kwargs): # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.boxplot) -def boxplot(x, notch=0, sym='b+', vert=1, whis=1.5, positions=None, widths=None, patch_artist=False, bootstrap=None, hold=None): +def boxplot(x, notch=0, sym='b+', vert=1, whis=1.5, positions=None, widths=None, + patch_artist=False, bootstrap=None, hold=None): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2399,7 +2400,9 @@ def boxplot(x, notch=0, sym='b+', vert=1, whis=1.5, positions=None, widths=None, if hold is not None: ax.hold(hold) try: - ret = ax.boxplot(x, notch, sym, vert, whis, positions, widths, patch_artist, bootstrap) + ret = ax.boxplot(x, notch=notch, sym=sym, vert=vert, whis=whis, + positions=positions, widths=widths, + patch_artist=patch_artist, bootstrap=bootstrap) draw_if_interactive() finally: ax.hold(washold) @@ -2409,7 +2412,9 @@ def boxplot(x, notch=0, sym='b+', vert=1, whis=1.5, positions=None, widths=None, # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.cohere) -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): +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): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2417,7 +2422,9 @@ def cohere(x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.wi if hold is not None: ax.hold(hold) try: - ret = ax.cohere(x, y, NFFT, Fs, Fc, detrend, window, noverlap, pad_to, sides, scale_by_freq, **kwargs) + ret = ax.cohere(x, y, NFFT=NFFT, Fs=Fs, Fc=Fc, detrend=detrend, + window=window, noverlap=noverlap, pad_to=pad_to, + sides=sides, scale_by_freq=scale_by_freq, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2481,7 +2488,9 @@ def contourf(*args, **kwargs): # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.csd) -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): +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): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2489,7 +2498,9 @@ def csd(x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.windo if hold is not None: ax.hold(hold) try: - ret = ax.csd(x, y, NFFT, Fs, Fc, detrend, window, noverlap, pad_to, sides, scale_by_freq, **kwargs) + ret = ax.csd(x, y, NFFT=NFFT, Fs=Fs, Fc=Fc, detrend=detrend, + window=window, noverlap=noverlap, pad_to=pad_to, + sides=sides, scale_by_freq=scale_by_freq, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2499,7 +2510,9 @@ def csd(x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.windo # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.errorbar) -def errorbar(x, y, yerr=None, xerr=None, fmt='-', ecolor=None, elinewidth=None, capsize=3, barsabove=False, lolims=False, uplims=False, xlolims=False, xuplims=False, errorevery=1, hold=None, **kwargs): +def errorbar(x, y, yerr=None, xerr=None, fmt='-', ecolor=None, elinewidth=None, + capsize=3, barsabove=False, lolims=False, uplims=False, + xlolims=False, xuplims=False, errorevery=1, hold=None, **kwargs): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2507,7 +2520,11 @@ def errorbar(x, y, yerr=None, xerr=None, fmt='-', ecolor=None, elinewidth=None, if hold is not None: ax.hold(hold) try: - ret = ax.errorbar(x, y, yerr, xerr, fmt, ecolor, elinewidth, capsize, barsabove, lolims, uplims, xlolims, xuplims, errorevery, **kwargs) + ret = ax.errorbar(x, y, yerr=yerr, xerr=xerr, fmt=fmt, ecolor=ecolor, + elinewidth=elinewidth, capsize=capsize, + barsabove=barsabove, lolims=lolims, uplims=uplims, + xlolims=xlolims, xuplims=xuplims, + errorevery=errorevery, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2543,7 +2560,8 @@ def fill_between(x, y1, y2=0, where=None, interpolate=False, hold=None, **kwargs if hold is not None: ax.hold(hold) try: - ret = ax.fill_between(x, y1, y2, where, interpolate, **kwargs) + ret = ax.fill_between(x, y1, y2=y2, where=where, + interpolate=interpolate, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2561,7 +2579,7 @@ def fill_betweenx(y, x1, x2=0, where=None, hold=None, **kwargs): if hold is not None: ax.hold(hold) try: - ret = ax.fill_betweenx(y, x1, x2, where, **kwargs) + ret = ax.fill_betweenx(y, x1, x2=x2, where=where, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2571,7 +2589,11 @@ def fill_betweenx(y, x1, x2=0, where=None, hold=None, **kwargs): # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.hexbin) -def hexbin(x, y, C=None, gridsize=100, bins=None, xscale='linear', yscale='linear', extent=None, cmap=None, norm=None, vmin=None, vmax=None, alpha=None, linewidths=None, edgecolors='none', reduce_C_function=np.mean, mincnt=None, marginals=False, hold=None, **kwargs): +def hexbin(x, y, C=None, gridsize=100, bins=None, xscale='linear', + yscale='linear', extent=None, cmap=None, norm=None, vmin=None, + vmax=None, alpha=None, linewidths=None, edgecolors='none', + reduce_C_function=np.mean, mincnt=None, marginals=False, hold=None, + **kwargs): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2579,7 +2601,12 @@ def hexbin(x, y, C=None, gridsize=100, bins=None, xscale='linear', yscale='linea if hold is not None: ax.hold(hold) try: - ret = ax.hexbin(x, y, C, gridsize, bins, xscale, yscale, extent, cmap, norm, vmin, vmax, alpha, linewidths, edgecolors, reduce_C_function, mincnt, marginals, **kwargs) + ret = ax.hexbin(x, y, C=C, gridsize=gridsize, bins=bins, xscale=xscale, + yscale=yscale, extent=extent, cmap=cmap, norm=norm, + vmin=vmin, vmax=vmax, alpha=alpha, + linewidths=linewidths, edgecolors=edgecolors, + reduce_C_function=reduce_C_function, mincnt=mincnt, + marginals=marginals, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2589,7 +2616,9 @@ def hexbin(x, y, C=None, gridsize=100, bins=None, xscale='linear', yscale='linea # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.hist) -def hist(x, bins=10, range=None, normed=False, weights=None, cumulative=False, bottom=None, histtype='bar', align='mid', orientation='vertical', rwidth=None, log=False, color=None, label=None, hold=None, **kwargs): +def hist(x, bins=10, range=None, normed=False, weights=None, cumulative=False, + bottom=None, histtype='bar', align='mid', orientation='vertical', + rwidth=None, log=False, color=None, label=None, hold=None, **kwargs): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2597,7 +2626,11 @@ def hist(x, bins=10, range=None, normed=False, weights=None, cumulative=False, b if hold is not None: ax.hold(hold) try: - ret = ax.hist(x, bins, range, normed, weights, cumulative, bottom, histtype, align, orientation, rwidth, log, color, label, **kwargs) + ret = ax.hist(x, bins=bins, range=range, normed=normed, + weights=weights, cumulative=cumulative, bottom=bottom, + histtype=histtype, align=align, orientation=orientation, + rwidth=rwidth, log=log, color=color, label=label, + **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2607,7 +2640,8 @@ def hist(x, bins=10, range=None, normed=False, weights=None, cumulative=False, b # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.hist2d) -def hist2d(x, y, bins=10, range=None, normed=False, weights=None, cmin=None, cmax=None, hold=None, **kwargs): +def hist2d(x, y, bins=10, range=None, normed=False, weights=None, cmin=None, + cmax=None, hold=None, **kwargs): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2615,7 +2649,8 @@ def hist2d(x, y, bins=10, range=None, normed=False, weights=None, cmin=None, cma if hold is not None: ax.hold(hold) try: - ret = ax.hist2d(x, y, bins, range, normed, weights, cmin, cmax, **kwargs) + ret = ax.hist2d(x, y, bins=bins, range=range, normed=normed, + weights=weights, cmin=cmin, cmax=cmax, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2625,7 +2660,8 @@ def hist2d(x, y, bins=10, range=None, normed=False, weights=None, cmin=None, cma # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.hlines) -def hlines(y, xmin, xmax, colors='k', linestyles='solid', label='', hold=None, **kwargs): +def hlines(y, xmin, xmax, colors='k', linestyles='solid', label='', hold=None, + **kwargs): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2633,7 +2669,8 @@ def hlines(y, xmin, xmax, colors='k', linestyles='solid', label='', hold=None, * if hold is not None: ax.hold(hold) try: - ret = ax.hlines(y, xmin, xmax, colors, linestyles, label, **kwargs) + ret = ax.hlines(y, xmin, xmax, colors=colors, linestyles=linestyles, + label=label, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2643,7 +2680,10 @@ def hlines(y, xmin, xmax, colors='k', linestyles='solid', label='', hold=None, * # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.imshow) -def imshow(X, cmap=None, norm=None, aspect=None, interpolation=None, alpha=None, vmin=None, vmax=None, origin=None, extent=None, shape=None, filternorm=1, filterrad=4.0, imlim=None, resample=None, url=None, hold=None, **kwargs): +def imshow(X, cmap=None, norm=None, aspect=None, interpolation=None, alpha=None, + vmin=None, vmax=None, origin=None, extent=None, shape=None, + filternorm=1, filterrad=4.0, imlim=None, resample=None, url=None, + hold=None, **kwargs): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2651,7 +2691,11 @@ def imshow(X, cmap=None, norm=None, aspect=None, interpolation=None, alpha=None, if hold is not None: ax.hold(hold) try: - ret = ax.imshow(X, cmap, norm, aspect, interpolation, alpha, vmin, vmax, origin, extent, shape, filternorm, filterrad, imlim, resample, url, **kwargs) + ret = ax.imshow(X, cmap=cmap, norm=norm, aspect=aspect, + interpolation=interpolation, alpha=alpha, vmin=vmin, + vmax=vmax, origin=origin, extent=extent, shape=shape, + filternorm=filternorm, filterrad=filterrad, + imlim=imlim, resample=resample, url=url, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2715,7 +2759,9 @@ def pcolormesh(*args, **kwargs): # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.pie) -def pie(x, explode=None, labels=None, colors=None, autopct=None, pctdistance=0.6, shadow=False, labeldistance=1.1, startangle=None, radius=None, hold=None): +def pie(x, explode=None, labels=None, colors=None, autopct=None, + pctdistance=0.6, shadow=False, labeldistance=1.1, startangle=None, + radius=None, hold=None): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2723,7 +2769,10 @@ def pie(x, explode=None, labels=None, colors=None, autopct=None, pctdistance=0.6 if hold is not None: ax.hold(hold) try: - ret = ax.pie(x, explode, labels, colors, autopct, pctdistance, shadow, labeldistance, startangle, radius) + ret = ax.pie(x, explode=explode, labels=labels, colors=colors, + autopct=autopct, pctdistance=pctdistance, shadow=shadow, + labeldistance=labeldistance, startangle=startangle, + radius=radius) draw_if_interactive() finally: ax.hold(washold) @@ -2751,7 +2800,8 @@ def plot(*args, **kwargs): # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.plot_date) -def plot_date(x, y, fmt='bo', tz=None, xdate=True, ydate=False, hold=None, **kwargs): +def plot_date(x, y, fmt='bo', tz=None, xdate=True, ydate=False, hold=None, + **kwargs): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2759,7 +2809,8 @@ def plot_date(x, y, fmt='bo', tz=None, xdate=True, ydate=False, hold=None, **kwa if hold is not None: ax.hold(hold) try: - ret = ax.plot_date(x, y, fmt, tz, xdate, ydate, **kwargs) + ret = ax.plot_date(x, y, fmt=fmt, tz=tz, xdate=xdate, ydate=ydate, + **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2769,7 +2820,9 @@ def plot_date(x, y, fmt='bo', tz=None, xdate=True, ydate=False, hold=None, **kwa # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.psd) -def psd(x, 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): +def psd(x, 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): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2777,7 +2830,9 @@ def psd(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_h if hold is not None: ax.hold(hold) try: - ret = ax.psd(x, NFFT, Fs, Fc, detrend, window, noverlap, pad_to, sides, scale_by_freq, **kwargs) + ret = ax.psd(x, NFFT=NFFT, Fs=Fs, Fc=Fc, detrend=detrend, + window=window, noverlap=noverlap, pad_to=pad_to, + sides=sides, scale_by_freq=scale_by_freq, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2823,7 +2878,9 @@ def quiverkey(*args, **kw): # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.scatter) -def scatter(x, y, s=20, c='b', marker='o', cmap=None, norm=None, vmin=None, vmax=None, alpha=None, linewidths=None, faceted=True, verts=None, hold=None, **kwargs): +def scatter(x, y, s=20, c='b', marker='o', cmap=None, norm=None, vmin=None, + vmax=None, alpha=None, linewidths=None, faceted=True, verts=None, + hold=None, **kwargs): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2831,7 +2888,10 @@ def scatter(x, y, s=20, c='b', marker='o', cmap=None, norm=None, vmin=None, vmax if hold is not None: ax.hold(hold) try: - ret = ax.scatter(x, y, s, c, marker, cmap, norm, vmin, vmax, alpha, linewidths, faceted, verts, **kwargs) + ret = ax.scatter(x, y, s=s, c=c, marker=marker, cmap=cmap, norm=norm, + vmin=vmin, vmax=vmax, alpha=alpha, + linewidths=linewidths, faceted=faceted, verts=verts, + **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2877,7 +2937,10 @@ def semilogy(*args, **kwargs): # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.specgram) -def specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=128, cmap=None, xextent=None, pad_to=None, sides='default', scale_by_freq=None, hold=None, **kwargs): +def specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, + window=mlab.window_hanning, noverlap=128, cmap=None, xextent=None, + pad_to=None, sides='default', scale_by_freq=None, hold=None, + **kwargs): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2885,7 +2948,10 @@ def specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.win if hold is not None: ax.hold(hold) try: - ret = ax.specgram(x, NFFT, Fs, Fc, detrend, window, noverlap, cmap, xextent, pad_to, sides, scale_by_freq, **kwargs) + ret = ax.specgram(x, NFFT=NFFT, Fs=Fs, Fc=Fc, detrend=detrend, + window=window, noverlap=noverlap, cmap=cmap, + xextent=xextent, pad_to=pad_to, sides=sides, + scale_by_freq=scale_by_freq, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -2895,7 +2961,8 @@ def specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.win # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.stem) -def stem(x, y, linefmt='b-', markerfmt='bo', basefmt='r-', bottom=None, label=None, hold=None): +def stem(x, y, linefmt='b-', markerfmt='bo', basefmt='r-', bottom=None, + label=None, hold=None): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2903,7 +2970,8 @@ def stem(x, y, linefmt='b-', markerfmt='bo', basefmt='r-', bottom=None, label=No if hold is not None: ax.hold(hold) try: - ret = ax.stem(x, y, linefmt, markerfmt, basefmt, bottom, label) + ret = ax.stem(x, y, linefmt=linefmt, markerfmt=markerfmt, + basefmt=basefmt, bottom=bottom, label=label) draw_if_interactive() finally: ax.hold(washold) @@ -2931,7 +2999,9 @@ def step(x, y, *args, **kwargs): # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.streamplot) -def streamplot(x, y, u, v, density=1, linewidth=None, color=None, cmap=None, norm=None, arrowsize=1, arrowstyle='-|>', minlength=0.1, hold=None): +def streamplot(x, y, u, v, density=1, linewidth=None, color=None, cmap=None, + norm=None, arrowsize=1, arrowstyle='-|>', minlength=0.1, + hold=None): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2939,7 +3009,10 @@ def streamplot(x, y, u, v, density=1, linewidth=None, color=None, cmap=None, nor if hold is not None: ax.hold(hold) try: - ret = ax.streamplot(x, y, u, v, density, linewidth, color, cmap, norm, arrowsize, arrowstyle, minlength) + ret = ax.streamplot(x, y, u, v, density=density, linewidth=linewidth, + color=color, cmap=cmap, norm=norm, + arrowsize=arrowsize, arrowstyle=arrowstyle, + minlength=minlength) draw_if_interactive() finally: ax.hold(washold) @@ -3021,7 +3094,8 @@ def triplot(*args, **kwargs): # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.vlines) -def vlines(x, ymin, ymax, colors='k', linestyles='solid', label='', hold=None, **kwargs): +def vlines(x, ymin, ymax, colors='k', linestyles='solid', label='', hold=None, + **kwargs): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -3029,7 +3103,8 @@ def vlines(x, ymin, ymax, colors='k', linestyles='solid', label='', hold=None, * if hold is not None: ax.hold(hold) try: - ret = ax.vlines(x, ymin, ymax, colors, linestyles, label, **kwargs) + ret = ax.vlines(x, ymin, ymax, colors=colors, linestyles=linestyles, + label=label, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -3039,7 +3114,8 @@ def vlines(x, ymin, ymax, colors='k', linestyles='solid', label='', hold=None, * # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.xcorr) -def xcorr(x, y, normed=True, detrend=mlab.detrend_none, usevlines=True, maxlags=10, hold=None, **kwargs): +def xcorr(x, y, normed=True, detrend=mlab.detrend_none, usevlines=True, + maxlags=10, hold=None, **kwargs): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -3047,7 +3123,8 @@ def xcorr(x, y, normed=True, detrend=mlab.detrend_none, usevlines=True, maxlags= if hold is not None: ax.hold(hold) try: - ret = ax.xcorr(x, y, normed, detrend, usevlines, maxlags, **kwargs) + ret = ax.xcorr(x, y, normed=normed, detrend=detrend, + usevlines=usevlines, maxlags=maxlags, **kwargs) draw_if_interactive() finally: ax.hold(washold) @@ -3076,7 +3153,7 @@ def barbs(*args, **kw): # changes will be lost @docstring.copy_dedent(Axes.cla) def cla(): - ret = gca().cla() + ret = gca().cla() draw_if_interactive() return ret @@ -3084,7 +3161,7 @@ def cla(): # changes will be lost @docstring.copy_dedent(Axes.grid) def grid(b=None, which='major', axis='both', **kwargs): - ret = gca().grid(b, which, axis, **kwargs) + ret = gca().grid(b=b, which=which, axis=axis, **kwargs) draw_if_interactive() return ret @@ -3092,7 +3169,7 @@ def grid(b=None, which='major', axis='both', **kwargs): # changes will be lost @docstring.copy_dedent(Axes.legend) def legend(*args, **kwargs): - ret = gca().legend(*args, **kwargs) + ret = gca().legend(*args, **kwargs) draw_if_interactive() return ret @@ -3100,7 +3177,7 @@ def legend(*args, **kwargs): # changes will be lost @docstring.copy_dedent(Axes.table) def table(**kwargs): - ret = gca().table(**kwargs) + ret = gca().table(**kwargs) draw_if_interactive() return ret @@ -3108,7 +3185,7 @@ def table(**kwargs): # changes will be lost @docstring.copy_dedent(Axes.text) def text(x, y, s, fontdict=None, withdash=False, **kwargs): - ret = gca().text(x, y, s, fontdict, withdash, **kwargs) + ret = gca().text(x, y, s, fontdict=fontdict, withdash=withdash, **kwargs) draw_if_interactive() return ret @@ -3116,7 +3193,7 @@ def text(x, y, s, fontdict=None, withdash=False, **kwargs): # changes will be lost @docstring.copy_dedent(Axes.annotate) def annotate(*args, **kwargs): - ret = gca().annotate(*args, **kwargs) + ret = gca().annotate(*args, **kwargs) draw_if_interactive() return ret @@ -3124,7 +3201,7 @@ def annotate(*args, **kwargs): # changes will be lost @docstring.copy_dedent(Axes.ticklabel_format) def ticklabel_format(**kwargs): - ret = gca().ticklabel_format(**kwargs) + ret = gca().ticklabel_format(**kwargs) draw_if_interactive() return ret @@ -3132,7 +3209,7 @@ def ticklabel_format(**kwargs): # changes will be lost @docstring.copy_dedent(Axes.locator_params) def locator_params(axis='both', tight=None, **kwargs): - ret = gca().locator_params(axis, tight, **kwargs) + ret = gca().locator_params(axis=axis, tight=tight, **kwargs) draw_if_interactive() return ret @@ -3140,7 +3217,7 @@ def locator_params(axis='both', tight=None, **kwargs): # changes will be lost @docstring.copy_dedent(Axes.tick_params) def tick_params(axis='both', **kwargs): - ret = gca().tick_params(axis, **kwargs) + ret = gca().tick_params(axis=axis, **kwargs) draw_if_interactive() return ret @@ -3148,7 +3225,7 @@ def tick_params(axis='both', **kwargs): # changes will be lost @docstring.copy_dedent(Axes.margins) def margins(*args, **kw): - ret = gca().margins(*args, **kw) + ret = gca().margins(*args, **kw) draw_if_interactive() return ret @@ -3156,7 +3233,7 @@ def margins(*args, **kw): # changes will be lost @docstring.copy_dedent(Axes.autoscale) def autoscale(enable=True, axis='both', tight=None): - ret = gca().autoscale(enable, axis, tight) + ret = gca().autoscale(enable=enable, axis=axis, tight=tight) draw_if_interactive() return ret