Skip to content

Commit 1b4d97e

Browse files
committed
Fix matplotlib error caused by erroneous labelling of x-axes in plots
1 parent b281a05 commit 1b4d97e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

requirements/base.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ geopandas >= 0.13, < 0.15
44
importlib_resources >= 6, < 7
55
ipykernel < 7
66
lxml < 5
7-
matplotlib >= 3, < 3.10
7+
matplotlib >= 3, < 4
88
numpy >= 1, < 2
99
pandas >= 1.5, < 3
1010
plotly >= 4, < 6

src/pam/plot/stats.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def plot_activity_duration(list_of_populations, exclude=None, axis=None):
166166
axis.bar(x, y)
167167
axis.plot()
168168
axis.set_title(title)
169-
axis.xaxis.set_label("")
169+
axis.xaxis.set_label_text("")
170170
axis.xaxis.set_ticks(x)
171171
axis.xaxis.set_ticklabels(x, rotation=x_label_rotation)
172172
return outputs_df
@@ -191,7 +191,7 @@ def plot_leg_duration(list_of_populations, axis=None):
191191
axis.bar(x, y)
192192
axis.plot()
193193
axis.set_title(title)
194-
axis.xaxis.set_label("")
194+
axis.xaxis.set_label_text("")
195195
axis.xaxis.set_ticks(x)
196196
axis.xaxis.set_ticklabels(x, rotation=x_label_rotation)
197197
return outputs_df

0 commit comments

Comments
 (0)