Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
matplotlib.pyplot.Figure
"""
nsweeps = len(sweep_sequence)
if axs is None:
fig, axs = plt.subplots(2, 1, sharex=True)
else:
fig = axs[0].get_figure()
for i in range(nsweeps):
start, stop, ts = sweep_sequence['recordings'].iloc[i]['response'].iloc[0]
show_indexed_timeseries_mpl(ts, istart=start, istop=stop, ax=axs[0], zero_start=True, xlabel='', title=title, **kwargs)
start, stop, ts = sweep_sequence['recordings'].iloc[i]['stimulus'].iloc[0]
show_indexed_timeseries_mpl(ts, istart=start, istop=stop, ax=axs[1], zero_start=True, **kwargs)
return fig
Returns
-------
matplotlib.pyplot.Figure
"""
nsweeps = len(sweep_sequence)
if axs is None:
fig, axs = plt.subplots(2, 1, sharex=True)
else:
fig = axs[0].get_figure()
for i in range(nsweeps):
start, stop, ts = sweep_sequence['recordings'].iloc[i]['response'].iloc[0]
show_indexed_timeseries_mpl(ts, istart=start, istop=stop, ax=axs[0], zero_start=True, xlabel='', title=title, **kwargs)
start, stop, ts = sweep_sequence['recordings'].iloc[i]['stimulus'].iloc[0]
show_indexed_timeseries_mpl(ts, istart=start, istop=stop, ax=axs[1], zero_start=True, **kwargs)
return fig