Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add eventplot to pyplot via boilerplate

  • Loading branch information...
commit 3dc54a6aaac46aa3840e45b38c3ede95e098c6bb 1 parent 8072b7d
@toddrjen toddrjen authored
Showing with 86 additions and 62 deletions.
  1. +1 −0  boilerplate.py
  2. +85 −62 lib/matplotlib/pyplot.py
View
1  boilerplate.py
@@ -108,6 +108,7 @@ def boilerplate_gen():
'contourf',
'csd',
'errorbar',
+ 'eventplot',
'fill',
'fill_between',
'fill_betweenx',
View
147 lib/matplotlib/pyplot.py
@@ -2271,7 +2271,7 @@ def spy(Z, precision=0, marker=None, markersize=None, aspect='equal', hold=None,
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2294,7 +2294,7 @@ def acorr(x, hold=None, **kwargs):
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2302,7 +2302,7 @@ def acorr(x, hold=None, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2312,7 +2312,7 @@ def arrow(x, y, dx, dy, hold=None, **kwargs):
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2320,7 +2320,7 @@ def arrow(x, y, dx, dy, hold=None, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2330,7 +2330,7 @@ def axhline(y=0, xmin=0, xmax=1, hold=None, **kwargs):
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2338,7 +2338,7 @@ def axhline(y=0, xmin=0, xmax=1, hold=None, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2348,7 +2348,7 @@ def axhspan(ymin, ymax, xmin=0, xmax=1, hold=None, **kwargs):
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2356,7 +2356,7 @@ def axhspan(ymin, ymax, xmin=0, xmax=1, hold=None, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2366,7 +2366,7 @@ def axvline(x=0, ymin=0, ymax=1, hold=None, **kwargs):
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2374,7 +2374,7 @@ def axvline(x=0, ymin=0, ymax=1, hold=None, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2384,7 +2384,7 @@ def axvspan(xmin, xmax, ymin=0, ymax=1, hold=None, **kwargs):
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2392,7 +2392,7 @@ def axvspan(xmin, xmax, ymin=0, ymax=1, hold=None, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2402,7 +2402,7 @@ def bar(left, height, width=0.8, bottom=None, hold=None, **kwargs):
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2410,7 +2410,7 @@ def bar(left, height, width=0.8, bottom=None, hold=None, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2420,7 +2420,7 @@ def barh(bottom, width, height=0.8, left=None, hold=None, **kwargs):
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2428,7 +2428,7 @@ def barh(bottom, width, height=0.8, left=None, hold=None, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2438,7 +2438,7 @@ def broken_barh(xranges, yrange, hold=None, **kwargs):
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2446,7 +2446,7 @@ def broken_barh(xranges, yrange, hold=None, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2458,7 +2458,7 @@ def boxplot(x, notch=False, sym='b+', vert=True, whis=1.5, positions=None,
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2469,7 +2469,7 @@ def boxplot(x, notch=False, sym='b+', vert=True, whis=1.5, positions=None,
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2491,7 +2491,7 @@ def cohere(x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2509,7 +2509,7 @@ def clabel(CS, *args, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2557,7 +2557,7 @@ def csd(x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2567,7 +2567,7 @@ def csd(x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2580,7 +2580,7 @@ def errorbar(x, y, yerr=None, xerr=None, fmt='-', ecolor=None, elinewidth=None,
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2592,7 +2592,30 @@ def errorbar(x, y, yerr=None, xerr=None, fmt='-', ecolor=None, elinewidth=None,
draw_if_interactive()
finally:
ax.hold(washold)
+
+ return ret
+# This function was autogenerated by boilerplate.py. Do not edit as
+# changes will be lost
+@_autogen_docstring(Axes.eventplot)
+def eventplot(positions, orientation='horizontal', lineoffsets=1, linelengths=1,
+ linewidths=None, colors=None, linestyles='solid', hold=None,
+ **kwargs):
+ ax = gca()
+ # allow callers to override the hold state by passing hold=True|False
+ washold = ax.ishold()
+
+ if hold is not None:
+ ax.hold(hold)
+ try:
+ ret = ax.eventplot(positions, orientation=orientation,
+ lineoffsets=lineoffsets, linelengths=linelengths,
+ linewidths=linewidths, colors=colors,
+ linestyles=linestyles, **kwargs)
+ draw_if_interactive()
+ finally:
+ ax.hold(washold)
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2610,7 +2633,7 @@ def fill(*args, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2620,7 +2643,7 @@ def fill_between(x, y1, y2=0, where=None, interpolate=False, hold=None, **kwargs
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2629,7 +2652,7 @@ def fill_between(x, y1, y2=0, where=None, interpolate=False, hold=None, **kwargs
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2639,7 +2662,7 @@ def fill_betweenx(y, x1, x2=0, where=None, hold=None, **kwargs):
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2647,7 +2670,7 @@ def fill_betweenx(y, x1, x2=0, where=None, hold=None, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2661,7 +2684,7 @@ def hexbin(x, y, C=None, gridsize=100, bins=None, xscale='linear',
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2687,7 +2710,7 @@ def hist(x, bins=10, range=None, normed=False, weights=None, cumulative=False,
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2699,7 +2722,7 @@ def hist(x, bins=10, range=None, normed=False, weights=None, cumulative=False,
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2710,7 +2733,7 @@ def hist2d(x, y, bins=10, range=None, normed=False, weights=None, cmin=None,
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2730,7 +2753,7 @@ def hlines(y, xmin, xmax, colors='k', linestyles='solid', label='', hold=None,
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2739,7 +2762,7 @@ def hlines(y, xmin, xmax, colors='k', linestyles='solid', label='', hold=None,
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2752,7 +2775,7 @@ def imshow(X, cmap=None, norm=None, aspect=None, interpolation=None, alpha=None,
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2782,7 +2805,7 @@ def loglog(*args, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2830,7 +2853,7 @@ def pie(x, explode=None, labels=None, colors=None, autopct=None,
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2841,7 +2864,7 @@ def pie(x, explode=None, labels=None, colors=None, autopct=None,
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2859,7 +2882,7 @@ def plot(*args, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2870,7 +2893,7 @@ def plot_date(x, y, fmt='bo', tz=None, xdate=True, ydate=False, hold=None,
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2879,7 +2902,7 @@ def plot_date(x, y, fmt='bo', tz=None, xdate=True, ydate=False, hold=None,
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2891,7 +2914,7 @@ def psd(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2901,7 +2924,7 @@ def psd(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2937,7 +2960,7 @@ def quiverkey(*args, **kw):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2949,7 +2972,7 @@ def scatter(x, y, s=20, c='b', marker='o', cmap=None, norm=None, vmin=None,
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -2977,7 +3000,7 @@ def semilogx(*args, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -2995,7 +3018,7 @@ def semilogy(*args, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -3008,7 +3031,7 @@ def specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -3037,7 +3060,7 @@ def stackplot(x, *args, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -3055,7 +3078,7 @@ def stem(*args, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -3073,7 +3096,7 @@ def step(x, y, *args, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -3085,7 +3108,7 @@ def streamplot(x, y, u, v, density=1, linewidth=None, color=None, cmap=None,
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -3096,7 +3119,7 @@ def streamplot(x, y, u, v, density=1, linewidth=None, color=None, cmap=None,
draw_if_interactive()
finally:
ax.hold(washold)
- sci(ret.lines)
+ sci(ret)
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -3168,7 +3191,7 @@ def triplot(*args, **kwargs):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -3179,7 +3202,7 @@ def vlines(x, ymin, ymax, colors='k', linestyles='solid', label='', hold=None,
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -3188,7 +3211,7 @@ def vlines(x, ymin, ymax, colors='k', linestyles='solid', label='', hold=None,
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -3199,7 +3222,7 @@ def xcorr(x, y, normed=True, detrend=mlab.detrend_none, usevlines=True,
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
-
+
if hold is not None:
ax.hold(hold)
try:
@@ -3208,7 +3231,7 @@ def xcorr(x, y, normed=True, detrend=mlab.detrend_none, usevlines=True,
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
@@ -3226,7 +3249,7 @@ def barbs(*args, **kw):
draw_if_interactive()
finally:
ax.hold(washold)
-
+
return ret
# This function was autogenerated by boilerplate.py. Do not edit as
Please sign in to comment.
Something went wrong with that request. Please try again.