diff --git a/pyFTS/partitioners/Util.py b/pyFTS/partitioners/Util.py index ad40384..b96d529 100644 --- a/pyFTS/partitioners/Util.py +++ b/pyFTS/partitioners/Util.py @@ -24,13 +24,14 @@ def plot_sets(sets: dict, titles : list, size=[12, 10], save=False, file=None, a """ num = len(sets) + num_cols_plot = 1 if axis is None: - fig, axes = plt.subplots(nrows=num, ncols=1, figsize=size) - for k in np.arange(0,num): + fig, axes = plt.subplots(nrows=num, ncols=num_cols_plot, figsize=size, squeeze=False) + for k in range(num): ticks = [] x = [] - ax = axes[k] if axis is None else axis + ax = axes[k, num_cols_plot-1] if axis is None else axis ax.set_title(titles[k]) ax.set_ylim([0, 1.1]) for key in sets[k].keys():