diff --git a/code/bolsonaro/visualization/plotter.py b/code/bolsonaro/visualization/plotter.py index a548e1b1072529eac230cc2a7f0d8ccbc921240b..9d7058732970fb5981ef04ce7a56e022ee68d5a9 100644 --- a/code/bolsonaro/visualization/plotter.py +++ b/code/bolsonaro/visualization/plotter.py @@ -37,12 +37,20 @@ class Plotter(object): n = len(all_experiment_scores) + """ + Get as many different colors from the specified cmap (here nipy_spectral) + as there are curve to plot. + """ colors = Plotter.get_colors_from_cmap(n) + # For each curve to plot for i in range(n): + # Retreive the scores in a list for each seed experiment_scores = list(all_experiment_scores[i].values()) + # Compute the mean and the std for the CI mean_experiment_scores = np.average(experiment_scores, axis=0) std_experiment_scores = np.std(experiment_scores, axis=0) + # Plot the score curve with the CI Plotter.plot_mean_and_CI( ax=ax, mean=mean_experiment_scores,