-
Notifications
You must be signed in to change notification settings - Fork 24
contains hotfixes for plotting utilities #133
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
Conversation
- fixed issue where border was drawn incorrectly - supressed std out message if unable to obtain region_border - axes can be chained for plot_consistency_test_result
- grab xticks from axes correly in plot_comparison_test - properly adjust xlim in plot_comparison_test
Codecov Report
@@ Coverage Diff @@
## master #133 +/- ##
==========================================
- Coverage 57.06% 56.97% -0.10%
==========================================
Files 19 19
Lines 3142 3147 +5
Branches 454 455 +1
==========================================
Hits 1793 1793
- Misses 1238 1243 +5
Partials 111 111
Continue to review full report at Codecov.
|
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.
Thanks for the check of the functions! I believe only plot_comparison_test() : ax.set_xlim(-0.5, len(results_t) - 0.5)
is needed for mergning
csep/core/regions.py
Outdated
desc.append(poly_max[2]) | ||
desc.append(poly_max[3]) |
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.
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 think this issue is from the way i am pulling out the outermost region. thanks for spotting this, i'll come up with a solution so it works for both cases.
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 pushed a hotfix for this issue. i checked it against the built in region. everything looks to work properly. if you have this pr cloned do you mind checking as well?
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.
Checked! Looks perfect
csep/utils/plots.py
Outdated
ax.set_ylim([ylims[0], ylims[1]]) | ||
ax.set_xlim([ax.get_xlim()[0] + 0.5, ax.get_xlim()[1] - 0.5]) | ||
ax.set_ylim([ylim[0], ylim[1]]) | ||
ax.set_xlim([ax.get_xlim()[0] - 0.5, ax.get_xlim()[1] + 0.5]) |
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.
This ax.set_xlim() change gives an extra edge border that I'm not sure is needed. This gives
versus this, which was in the previous xlim definition
But this failed for low number of Models in the t-test. I'd suggest to leave it better like:
ax.set_xlim([-0.5, len(results_t) - 0.5])
It appears to work well with any number of forecasts
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.
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.
checking....
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 really like the way these plots look!
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.
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 think i got it. i just pushed a new commit with that fix.
* try to determine which points to plot based on latitude values
* update xlim in plot_comparison_test
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.
Will be back tomorrow early. GL
csep/utils/plots.py
Outdated
@@ -1342,7 +1342,7 @@ def plot_comparison_test(results_t, results_w=None, axes=None, plot_args=None): | |||
xTickPos = ax.get_xticks() | |||
ax.yaxis.set_major_locator(matplotlib.ticker.MaxNLocator(integer=True)) | |||
ax.set_ylim([ylim[0], ylim[1]]) | |||
ax.set_xlim([ax.get_xlim()[0] - 0.5, ax.get_xlim()[1] + 0.5]) | |||
ax.set_xlim([0.5, len(results_t) - 0.5]) |
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.
nope, this still hides me a forecast. It works for me with [ - 0.5, len(results_t) - 0.5]. Weiirdd.
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.
missed the '-'. catch you tomorrow! gn!
* update xlim in plot_comparison_test
@pabloitu do you mind taking a look at this pr when you have a chance?
contains a few adjustments to the plotting utilites