From 7f534cfe22debd002185b97acbff49260ffd0931 Mon Sep 17 00:00:00 2001 From: mzouink Date: Wed, 31 Jul 2024 20:42:31 +0000 Subject: [PATCH] :art: Format Python code with psf/black --- dacapo/plot.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/dacapo/plot.py b/dacapo/plot.py index 8d9d3c2dd..d5bfe1d28 100644 --- a/dacapo/plot.py +++ b/dacapo/plot.py @@ -17,8 +17,7 @@ import os - - + RunInfo = namedtuple( "RunInfo", [ @@ -448,14 +447,22 @@ def plot_runs( criteria=run.validation_score_name ) colors_val = itertools.cycle(plt.cm.tab20.colors) - for dataset,color_v in zip(run.validation_scores.datasets,colors_val): + for dataset, color_v in zip(run.validation_scores.datasets, colors_val): dataset_data = validation_score_data.sel(datasets=dataset) include_validation_figure = True x = [score.iteration for score in run.validation_scores.scores] cc = next(colors_val) for i in range(dataset_data.data.shape[1]): - current_name = f"{i}_{dataset.name}_{name}_{run.validation_score_name}" - validation_ax.plot(x, dataset_data.data[:,i] , label=current_name, color=cc, alpha=0.5+0.2*i) + current_name = ( + f"{i}_{dataset.name}_{name}_{run.validation_score_name}" + ) + validation_ax.plot( + x, + dataset_data.data[:, i], + label=current_name, + color=cc, + alpha=0.5 + 0.2 * i, + ) print("VALIDATION PLOTTED") if include_loss_figure: @@ -471,4 +478,4 @@ def plot_runs( validation_ax.legend() plt.tight_layout() - plt.show() \ No newline at end of file + plt.show()