-
-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix xlabels and ax argument in plot_elpd #1601
Conversation
@@ -179,7 +179,8 @@ def plot_elpd( | |||
"{} - {}".format(models[i], models[j + 1]), fontsize=titlesize, wrap=True | |||
) | |||
if xlabels: | |||
set_xticklabels(ax[-1, -1], coord_labels) | |||
for i in range(len(ax)): | |||
set_xticklabels(ax[-1, :][i], coord_labels) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not completely sure about what is causing the test error. Matplotlib locators do take steps as an argument, and there has been no breaking change on that. The only thing that would make sense would be for the loop to be over the last column instead of being over the bottom row so that set_xticklabels
is trying to format an axis that has been set to off
and thus has no locator. But then you would not have been able to generate the example image you shared, so I am completely at a loss here, no idea what is happening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we don't need to loop over the last row, the x axis is shared and should have the same labels for all plots automatically I think 🤔
Codecov Report
@@ Coverage Diff @@
## main #1601 +/- ##
=======================================
Coverage 90.92% 90.92%
=======================================
Files 108 108
Lines 11665 11666 +1
=======================================
+ Hits 10606 10607 +1
Misses 1059 1059
Continue to review full report at Codecov.
|
* fix ax argument for numvars > 2 and xlabels * update changelog * fix xlabels
Description
Fix xlabels and ax argument in plot_elpd for numvars > 2.
Checklist