Skip to content

Commit

Permalink
override subplot titles
Browse files Browse the repository at this point in the history
  • Loading branch information
LFISHER7 committed Mar 27, 2024
1 parent e9821be commit d8a0883
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion analysis/report/panel_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,16 @@ def get_group_chart(
repeated,
autolabel=True,
)

if title =="Sore Throat Tonsillitis":
title = "Sore Throat/Tonsillitis"
elif title == "Invasive Strep A":
title = "iGAS"
elif title == "Age Band":
title = "Age Band (years)"
elif title == "Imd":
title = "Index of Multiple Deprivation (IMD) quintile"

ax.set_title(title)
# Filter out group, but ignore case
if exclude_group:
Expand Down Expand Up @@ -424,6 +434,7 @@ def get_group_chart(
lgd_params,
hide_legend,
)

# Save the season table only if there is more than one group
more_than_one_group = panel_group_data.group.nunique() > 1
if (produce_season_table and more_than_one_group) or mark_seasons:
Expand All @@ -432,7 +443,7 @@ def get_group_chart(
"group",
column_to_plot,
output_dir,
panel_group_data.iloc[0]["name"],
panel_group_data.iloc[0]["name"].replace("/", "_"),
)
if mark_seasons:
annotate_seasons(season_table, column_to_plot, ax)
Expand Down

0 comments on commit d8a0883

Please sign in to comment.