From 071f60a04e047aa5259d3d3dbc0841648bd1df51 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 2 Nov 2024 14:36:14 +0100 Subject: [PATCH] More compact code --- scripts/daily_plot.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/daily_plot.py b/scripts/daily_plot.py index cd863b7..24b3c4f 100755 --- a/scripts/daily_plot.py +++ b/scripts/daily_plot.py @@ -118,12 +118,9 @@ def create_plot(df_plt_today, now, is_top=None): plot_type = "Bottom" name = "Combo2" - # Generate colors dictionary - confmax_colors = dict(zip(confmax.index, colors)) - # Generate frequency plot plot = sns.countplot(y='Com_Name', hue='Com_Name', legend=False, data=df_plt_selection_today, - palette=confmax_colors, order=freq_order, ax=axs[0], edgecolor='lightgrey') + palette=dict(zip(confmax.index, colors)), order=freq_order, ax=axs[0], edgecolor='lightgrey') # Prints Max Confidence on bars show_values_on_bars(axs[0], confmax)