# to see contents of create_data function, look at the top-most algorithm's code
figure, axes, handles = create_plots(data, baselines)
for i, (ax, y) in enumerate(zip(axes, data)):
    if i == 1:
        segments = [100, 250, 300]
    elif i == 3:
        segments = [250, 380]
    else:
        segments = 1
    if i < 4:
        smooth_half_window = 5
    else:
        smooth_half_window = 0
    baseline, params = baseline_fitter.rubberband(
        y, segments=segments, lam=0, smooth_half_window=smooth_half_window
    )
    ax.plot(baseline, 'g--')