Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix : set_ticklabels warning #52

Merged
merged 4 commits into from
May 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scripts/daily_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ def create_plot(df_plt_today, now, is_top=None):

# Try plot grid lines between bars - problem at the moment plots grid lines on bars - want between bars
yticklabels = ['\n'.join(textwrap.wrap(ticklabel.get_text(), 16)) for ticklabel in plot.get_yticklabels()]
# Next two lines avoid a UserWarning on set_ticklabels() requesting a fixed number of ticks
yticks = plot.get_yticks()
plot.set_yticks(yticks)
plot.set_yticklabels(yticklabels, fontsize=10)
plot.set(ylabel=None)
plot.set(xlabel="Detections")
Expand Down
Loading