From 1b4d97e95252c7073ceca95b7a7484ddc86c1ddc Mon Sep 17 00:00:00 2001 From: Michael Fitzmaurice Date: Wed, 18 Dec 2024 17:02:43 +0000 Subject: [PATCH] Fix matplotlib error caused by erroneous labelling of x-axes in plots --- requirements/base.txt | 2 +- src/pam/plot/stats.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index ca97d8a8..90489974 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -4,7 +4,7 @@ geopandas >= 0.13, < 0.15 importlib_resources >= 6, < 7 ipykernel < 7 lxml < 5 -matplotlib >= 3, < 3.10 +matplotlib >= 3, < 4 numpy >= 1, < 2 pandas >= 1.5, < 3 plotly >= 4, < 6 diff --git a/src/pam/plot/stats.py b/src/pam/plot/stats.py index c2368e15..508659f3 100644 --- a/src/pam/plot/stats.py +++ b/src/pam/plot/stats.py @@ -166,7 +166,7 @@ def plot_activity_duration(list_of_populations, exclude=None, axis=None): axis.bar(x, y) axis.plot() axis.set_title(title) - axis.xaxis.set_label("") + axis.xaxis.set_label_text("") axis.xaxis.set_ticks(x) axis.xaxis.set_ticklabels(x, rotation=x_label_rotation) return outputs_df @@ -191,7 +191,7 @@ def plot_leg_duration(list_of_populations, axis=None): axis.bar(x, y) axis.plot() axis.set_title(title) - axis.xaxis.set_label("") + axis.xaxis.set_label_text("") axis.xaxis.set_ticks(x) axis.xaxis.set_ticklabels(x, rotation=x_label_rotation) return outputs_df