Skip to content

A live bird collage card for your Home Assistant dashboard.

Fix maxconf color scale

Alexandrec39fc1d19530
diff --git a/scripts/daily_plot.py b/scripts/daily_plot.py
index cce51b16..cd863b75 100755
--- a/scripts/daily_plot.py
+++ b/scripts/daily_plot.py
@@ -118,9 +118,12 @@ 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=colors, order=freq_order, ax=axs[0], edgecolor='lightgrey')
+ palette=confmax_colors, order=freq_order, ax=axs[0], edgecolor='lightgrey')
# Prints Max Confidence on bars
show_values_on_bars(axs[0], confmax)