diff --git a/pyFTS/common/Util.py b/pyFTS/common/Util.py index ade0419..8159d8d 100644 --- a/pyFTS/common/Util.py +++ b/pyFTS/common/Util.py @@ -265,7 +265,6 @@ def plot_interval2(intervals, data, **kwargs): :keyword typeonlegend: :keyword ls: matplotlib line style :keyword linewidth: matplotlib width - :return: a list [lower, upper] with the minimum and maximum bounds of the intervals ''' l = len(intervals) @@ -283,8 +282,6 @@ def plot_interval2(intervals, data, **kwargs): lower = [kk[0] for kk in intervals] upper = [kk[1] for kk in intervals] - mi = min(lower) * 0.95 - ma = max(upper) * 1.05 typeonlegend = kwargs.get('typeonlegend', False) color = kwargs.get('color', 'red') @@ -296,8 +293,6 @@ def plot_interval2(intervals, data, **kwargs): if typeonlegend: label += " (Interval)" ax.plot(lower, color=color, label=label, ls=ls,linewidth=linewidth) ax.plot(upper, color=color, ls=ls,linewidth=linewidth) - return [mi, ma] - def plot_rules(model, size=[5, 5], axis=None, rules_by_axis=None, columns=1): diff --git a/pyFTS/tests/general.py b/pyFTS/tests/general.py index e6b1358..1dd4c14 100644 --- a/pyFTS/tests/general.py +++ b/pyFTS/tests/general.py @@ -39,7 +39,7 @@ distributions = model.predict(test[:10], type='distribution', steps_ahead=horizo fig, ax = plt.subplots(nrows=1, ncols=1,figsize=[15,5]) ax.plot(test[:10], label='Original',color='black') -cUtil.plot_interval(ax, intervals, model.order, label='ensemble') +cUtil.plot_interval2(intervals, test[:10], start_at=3, ax=ax) cUtil.plot_distribution2(distributions, test[:10], start_at=2, ax=ax, cmap="Blues") '''