-
Notifications
You must be signed in to change notification settings - Fork 26
Modified comparison plot, to plot simultaneously T and W tests #132
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
cool @pabloitu! let me know when you think its ready to merge. |
csep/utils/plots.py
Outdated
def _get_marker_w_color(distribution): | ||
"""Returns matplotlib marker style as fmt string""" | ||
|
||
if distribution < 0.05: |
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.
should we also add the percentile argument for this plot 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.
done
csep/utils/plots.py
Outdated
ylims = plot_args.get('ylims', (None, None)) | ||
capsize = plot_args.get('capsize', 2) | ||
linewidth = plot_args.get('linewidth', 1) | ||
markersize = plot_args.get('markersize', 2) | ||
|
||
fig, ax = pyplot.subplots() |
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.
can you replace this line with the following code? this will let us plot this using a previously initialized axes
if axes is None:
fig, ax = pyplot.subplots(figsize=figsize)
else:
ax = axes
fig = ax.get_figure()
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.
done, and added axes as function argument
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.
awesome! ill merge this change once the CI is finished
…pyplot.ax() object and percentile for W-test confidence interval
Codecov Report
@@ Coverage Diff @@
## master #132 +/- ##
==========================================
+ Coverage 53.25% 57.06% +3.81%
==========================================
Files 19 19
Lines 3091 3142 +51
Branches 445 454 +9
==========================================
+ Hits 1646 1793 +147
+ Misses 1352 1238 -114
- Partials 93 111 +18
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.
this should be ready, but wanna test it with the Jupyter notebook for Figure 6, which guess can serve as tutorial
merging now |
Added customization options to plot_comparison_test, similar to those one of Poisson_consistency tests, and added functionality to plot simultaneously a list of w-test if provided. T-test bars are coloured by significance (green is sign. better, red if sign.worse and gray if not significant. W-test significance is shown with a filled marker at the mean IG.
However, this needs an example/tutorial so the "legend" can be explained.