Skip to content

Commit

Permalink
Fix matplotlib error caused by erroneous labelling of x-axes in plots
Browse files Browse the repository at this point in the history
  • Loading branch information
mfitz committed Dec 18, 2024
1 parent b281a05 commit 1b4d97e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/pam/plot/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 1b4d97e

Please sign in to comment.