From 1b8b3f4f561c95fca2d14f8a148a3687612b06f8 Mon Sep 17 00:00:00 2001
From: Alexandre <44178713+alexbelgium@users.noreply.github.com>
Date: Fri, 29 Nov 2024 11:27:09 +0100
Subject: [PATCH] Reduce font size for readability
---
scripts/utils/interactive_plot.py | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/scripts/utils/interactive_plot.py b/scripts/utils/interactive_plot.py
index cbcf91d1..b8a63fa8 100644
--- a/scripts/utils/interactive_plot.py
+++ b/scripts/utils/interactive_plot.py
@@ -58,7 +58,7 @@ def add_annotations(text_array, text_colors, col, species_list, all_hours, annot
if current_text:
annotations.append(dict(
x=0, y=species, text=current_text, showarrow=False,
- font=dict(color=current_color, size=12),
+ font=dict(color=current_color, size=10),
xref=f'x{col}', yref=f'y{col}', xanchor='center', yanchor='middle'
))
elif col == 3: # Multi-column heatmap
@@ -68,7 +68,7 @@ def add_annotations(text_array, text_colors, col, species_list, all_hours, annot
if current_text:
annotations.append(dict(
x=hour, y=species, text=current_text, showarrow=False,
- font=dict(color=current_color, size=12),
+ font=dict(color=current_color, size=10),
xref='x3', yref='y3', xanchor='center', yanchor='middle'
))
@@ -161,15 +161,15 @@ def create_plotly_heatmap(df_birds, now):
fig.update_layout(
title=dict(
- text=f"{main_title}
{subtitle}",
+ text=f"{main_title}
{subtitle}",
x=0.5, y=0.97, xanchor='center', yanchor='top',
- font=dict(size=24)
+ font=dict(size=20)
),
autosize=True,
height=max(600, len(species_list) * 25 + 100),
yaxis=dict(
autorange='reversed',
- tickfont=dict(size=12),
+ tickfont=dict(size=10),
showticklabels=True,
ticklabelstandoff=15,
fixedrange=True
@@ -177,18 +177,18 @@ def create_plotly_heatmap(df_birds, now):
xaxis1=dict(
title='Max Confidence',
showticklabels=False,
- title_font=dict(size=12),
+ title_font=dict(size=10),
fixedrange=True
),
xaxis2=dict(
title='Total Counts',
showticklabels=False,
- title_font=dict(size=12),
+ title_font=dict(size=10),
fixedrange=True
),
xaxis3=dict(
title='Hour',
- tickfont=dict(size=12),
+ tickfont=dict(size=10),
tickmode='linear',
dtick=1,
fixedrange=True
@@ -197,7 +197,7 @@ def create_plotly_heatmap(df_birds, now):
clickmode='event+select',
plot_bgcolor=PAPER_BGCOLOR,
paper_bgcolor=PAPER_BGCOLOR,
- font=dict(size=12, color='#000000'), # Global font color set to black
+ font=dict(size=10, color='#000000'), # Global font color set to black
dragmode=False
)
fig.update_xaxes(showgrid=False, zeroline=False)
@@ -235,11 +235,11 @@ def create_plotly_heatmap(df_birds, now):