More compact code

This commit is contained in:
Alexandre
2024-11-02 14:36:14 +01:00
committed by Nachtzuster
parent c39fc1d195
commit 071f60a04e
+1 -4
View File
@@ -118,12 +118,9 @@ def create_plot(df_plt_today, now, is_top=None):
plot_type = "Bottom" plot_type = "Bottom"
name = "Combo2" name = "Combo2"
# Generate colors dictionary
confmax_colors = dict(zip(confmax.index, colors))
# Generate frequency plot # Generate frequency plot
plot = sns.countplot(y='Com_Name', hue='Com_Name', legend=False, data=df_plt_selection_today, 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 # Prints Max Confidence on bars
show_values_on_bars(axs[0], confmax) show_values_on_bars(axs[0], confmax)