Skip to content
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7651923
Added preliminary code
JAnns98 Apr 5, 2024
7bda513
Fully functioning summary bars
JAnns98 Apr 9, 2024
cb28e6c
Added summary bars and edited aesthetic of contrast and swarm bars
JAnns98 Apr 12, 2024
d4d62cf
Moved the summary bars, contrast bars, and swarm bars into plot_tools
JAnns98 Apr 17, 2024
641c4ed
Fixed coloring of summary bars and added delta text (WIP)
JAnns98 Aug 29, 2024
ab8aa9f
Moved main delta_text code to a separate function in plot_tools
JAnns98 Aug 29, 2024
b4763ca
Bug fix and increased default alpha for contrast and swarm bars
JAnns98 Aug 30, 2024
43d61b3
Edits to delta-text to fit better on plots (especially when float_con…
JAnns98 Aug 30, 2024
83201f9
delta text bug fixes and added delta-delta and mini-meta support
JAnns98 Aug 30, 2024
74d3f3c
Bug fixes and allowing contrast bars to work on float_contrast plots
JAnns98 Sep 2, 2024
e196bc0
Bug fixes and cleaning up delta code
JAnns98 Sep 6, 2024
3c54561
Removed old delta text code
JAnns98 Sep 6, 2024
2982292
Moved delta dots to a separate function in plot_tools and renamed and…
JAnns98 Sep 6, 2024
601b74e
Added more kwargs options for deltadots
JAnns98 Sep 8, 2024
853ff52
Trimmed plotter function to move some code into two new misc_tools fu…
JAnns98 Sep 8, 2024
f1e2872
Trimmed plotter by creating two new misc_tools functions - get_color_…
JAnns98 Sep 8, 2024
c5f8bd2
Further trimming to plotter, changed get_fig_size function in misc_to…
JAnns98 Sep 8, 2024
b5542bc
minor edits
JAnns98 Sep 9, 2024
a14be86
More trimming and move code to misc_tools
JAnns98 Sep 9, 2024
3f65777
bug fix for 'gridkey' missing argument
JAnns98 Sep 9, 2024
667909b
Created a slopegraph_plotter function in plot_tools and trimmed plotter
JAnns98 Sep 9, 2024
889bede
Further trimming and moving extra params to misc_tools to help preven…
JAnns98 Sep 9, 2024
fb26eb0
removed redundant code
JAnns98 Sep 9, 2024
ac36489
Further trimming to group_summaries section of plotter
JAnns98 Sep 9, 2024
af1efba
Edit and moving some sankey code
JAnns98 Sep 9, 2024
6f8cb0d
Created a function in plot_tools to plot the contrast curve for the e…
JAnns98 Sep 9, 2024
21509c9
Further trimmed plotter and created function in misc_tools to extract…
JAnns98 Sep 10, 2024
4724cb4
Further trimmed plotter and created a new function in plot_tools for …
JAnns98 Sep 10, 2024
c298824
removing the commented out code from prior change
JAnns98 Sep 10, 2024
a9b6e52
Moved gridkey to separate function in plot_tools
JAnns98 Sep 10, 2024
10d13d3
trimmed plotter and created new function in plot_tools - barplotter
JAnns98 Sep 10, 2024
f3338dc
Trimmed plotter and added a function in misc_tools to edit the xticks…
JAnns98 Sep 10, 2024
36e3533
Trimmed plotter and added new functions in misc_tools to edit plot ae…
JAnns98 Sep 12, 2024
d91f285
Further trimming to plotter and created new function in misc_tools fo…
JAnns98 Sep 12, 2024
d319644
removed unnecessary imports
JAnns98 Sep 12, 2024
6f59874
formatting changes
JAnns98 Sep 12, 2024
ddeefa7
Trimming down plotter
JAnns98 Sep 12, 2024
2df0aff
Preliminary changes to plotter and scatterplot functions to allow leg…
JAnns98 Sep 13, 2024
57f0c58
Edit text for swarmplot legend
JAnns98 Sep 16, 2024
4528455
Minor text changes
JAnns98 Sep 17, 2024
c79688d
Fix a silly mistake in type hint
Jacobluke- Sep 18, 2024
144179b
Generate test image baseline for contrast bar
Jacobluke- Sep 19, 2024
5ad5a06
Merge branch 'vnbdev' of github.com:ACCLAB/DABEST-python into feat-co…
Jacobluke- Sep 23, 2024
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ _proc/
.gitattributes
.last_checked
.gitconfig
.cursorignore
*.bak
*.log
*~
Expand Down
2 changes: 2 additions & 0 deletions dabest/_api.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Loading data and relevant groups"""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/load.ipynb.

# %% auto 0
Expand Down
2 changes: 2 additions & 0 deletions dabest/_dabest_object.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Main class for estimating statistics and generating plots."""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/dabest_object.ipynb.

# %% auto 0
Expand Down
2 changes: 2 additions & 0 deletions dabest/_delta_objects.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Auxiliary delta classes for estimating statistics and generating plots."""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/delta_objects.ipynb.

# %% auto 0
Expand Down
51 changes: 46 additions & 5 deletions dabest/_effsize_objects.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""The auxiliary classes involved in the computations of bootstrapped effect sizes."""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/effsize_objects.ipynb.

# %% auto 0
Expand Down Expand Up @@ -994,10 +996,6 @@ def plot(
fig_size=None,
dpi=100,
ax=None,
contrast_show_es=False,
es_sf=2,
es_fontsize=10,
contrast_show_deltas=True,
gridkey_rows=None,
gridkey_merge_pairs=False,
gridkey_show_Ns=True,
Expand All @@ -1017,6 +1015,17 @@ def plot(
fontsize_contrastxlabel=12,
fontsize_contrastylabel=12,
fontsize_delta2label=12,
#### Contrast bars and delta text and delta dots WIP ####
contrast_bars=True,
swarm_bars=True,
contrast_bars_kwargs=None,
swarm_bars_kwargs=None,
summary_bars=None,
summary_bars_kwargs=None,
delta_text=True,
delta_text_kwargs=None,
delta_dot=True,
delta_dot_kwargs=None,
):
"""
Creates an estimation plot for the effect size of interest.
Expand Down Expand Up @@ -1159,7 +1168,39 @@ def plot(
Font size for the contrast axes ylabel.
fontsize_delta2label : float, default 12
Font size for the delta-delta axes ylabel.



contrast_bars : boolean, default True
Whether or not to display the contrast bars.
swarm_bars : boolean, default True
Whether or not to display the swarm bars.
contrast_bars_kwargs : dict, default None
Pass relevant keyword arguments to the contrast bars. Pass any keyword arguments accepted by
matplotlib.patches.Rectangle here, as a string. If None, the following keywords are passed:
{"color": None, "alpha": 0.3}
swarm_bars_kwargs : dict, default None
Pass relevant keyword arguments to the swarm bars. Pass any keyword arguments accepted by
matplotlib.patches.Rectangle here, as a string. If None, the following keywords are passed:
{"color": None, "alpha": 0.3}

summary_bars : list, default None
Pass a list of indices of the contrast objects to have summary bars displayed on the plot.
For example, [0,1] will show summary bars for the first two contrast objects.
summary_bars_kwargs: dict, default None
If None, the following keywords are passed: {"color": None, "alpha": 0.15}
delta_text : boolean, default True
Whether or not to display the text deltas.
delta_text_kwargs : dict, default None
Pass relevant keyword arguments to the delta text. Pass any keyword arguments accepted by
matplotlib.text.Text here, as a string. If None, the following keywords are passed:
{"color": None, "alpha": 1, "fontsize": 10, "ha": 'center', "va": 'center', "rotation": 0,
"x_location": 'right', "x_coordinates": None, "y_coordinates": None}
Use "x_coordinates" and "y_coordinates" if you would like to specify the text locations manually.
delta_dot : boolean, default True
Whether or not to display the delta dots on paired or repeated measure plots.
delta_dot_kwargs : dict, default None
Pass relevant keyword arguments. If None, the following keywords are passed:
{"marker": "^", "alpha": 0.5, "zorder": 2, "size": 3, "side": "right"}

Returns
-------
Expand Down
39 changes: 37 additions & 2 deletions dabest/_modidx.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,30 @@
'dabest/forest_plot.py'),
'dabest.forest_plot.forest_plot': ('API/forest_plot.html#forest_plot', 'dabest/forest_plot.py'),
'dabest.forest_plot.load_plot_data': ('API/forest_plot.html#load_plot_data', 'dabest/forest_plot.py')},
'dabest.misc_tools': { 'dabest.misc_tools.get_varname': ('API/misc_tools.html#get_varname', 'dabest/misc_tools.py'),
'dabest.misc_tools': { 'dabest.misc_tools.Cumming_Plot_Aesthetic_Adjustments': ( 'API/misc_tools.html#cumming_plot_aesthetic_adjustments',
'dabest/misc_tools.py'),
'dabest.misc_tools.Gardner_Altman_Plot_Aesthetic_Adjustments': ( 'API/misc_tools.html#gardner_altman_plot_aesthetic_adjustments',
'dabest/misc_tools.py'),
'dabest.misc_tools.General_Plot_Aesthetic_Adjustments': ( 'API/misc_tools.html#general_plot_aesthetic_adjustments',
'dabest/misc_tools.py'),
'dabest.misc_tools.add_counts_to_ticks': ( 'API/misc_tools.html#add_counts_to_ticks',
'dabest/misc_tools.py'),
'dabest.misc_tools.extract_contrast_plotting_ticks': ( 'API/misc_tools.html#extract_contrast_plotting_ticks',
'dabest/misc_tools.py'),
'dabest.misc_tools.get_color_palette': ('API/misc_tools.html#get_color_palette', 'dabest/misc_tools.py'),
'dabest.misc_tools.get_kwargs': ('API/misc_tools.html#get_kwargs', 'dabest/misc_tools.py'),
'dabest.misc_tools.get_params': ('API/misc_tools.html#get_params', 'dabest/misc_tools.py'),
'dabest.misc_tools.get_plot_groups': ('API/misc_tools.html#get_plot_groups', 'dabest/misc_tools.py'),
'dabest.misc_tools.get_varname': ('API/misc_tools.html#get_varname', 'dabest/misc_tools.py'),
'dabest.misc_tools.initialize_fig': ('API/misc_tools.html#initialize_fig', 'dabest/misc_tools.py'),
'dabest.misc_tools.merge_two_dicts': ('API/misc_tools.html#merge_two_dicts', 'dabest/misc_tools.py'),
'dabest.misc_tools.print_greeting': ('API/misc_tools.html#print_greeting', 'dabest/misc_tools.py'),
'dabest.misc_tools.set_xaxis_ticks_and_lims': ( 'API/misc_tools.html#set_xaxis_ticks_and_lims',
'dabest/misc_tools.py'),
'dabest.misc_tools.show_legend': ('API/misc_tools.html#show_legend', 'dabest/misc_tools.py'),
'dabest.misc_tools.unpack_and_add': ('API/misc_tools.html#unpack_and_add', 'dabest/misc_tools.py')},
'dabest.plot_tools': { 'dabest.plot_tools.SwarmPlot': ('API/plot_tools.html#swarmplot', 'dabest/plot_tools.py'),
'dabest.plot_tools': { 'dabest.plot_tools.DeltaDotsPlotter': ('API/plot_tools.html#deltadotsplotter', 'dabest/plot_tools.py'),
'dabest.plot_tools.SwarmPlot': ('API/plot_tools.html#swarmplot', 'dabest/plot_tools.py'),
'dabest.plot_tools.SwarmPlot.__init__': ( 'API/plot_tools.html#swarmplot.__init__',
'dabest/plot_tools.py'),
'dabest.plot_tools.SwarmPlot._adjust_gutter_points': ( 'API/plot_tools.html#swarmplot._adjust_gutter_points',
Expand All @@ -82,14 +101,30 @@
'dabest/plot_tools.py'),
'dabest.plot_tools.SwarmPlot._swarm': ('API/plot_tools.html#swarmplot._swarm', 'dabest/plot_tools.py'),
'dabest.plot_tools.SwarmPlot.plot': ('API/plot_tools.html#swarmplot.plot', 'dabest/plot_tools.py'),
'dabest.plot_tools.barplotter': ('API/plot_tools.html#barplotter', 'dabest/plot_tools.py'),
'dabest.plot_tools.check_data_matches_labels': ( 'API/plot_tools.html#check_data_matches_labels',
'dabest/plot_tools.py'),
'dabest.plot_tools.contrast_bars_plotter': ( 'API/plot_tools.html#contrast_bars_plotter',
'dabest/plot_tools.py'),
'dabest.plot_tools.delta_text_plotter': ( 'API/plot_tools.html#delta_text_plotter',
'dabest/plot_tools.py'),
'dabest.plot_tools.effect_size_curve_plotter': ( 'API/plot_tools.html#effect_size_curve_plotter',
'dabest/plot_tools.py'),
'dabest.plot_tools.error_bar': ('API/plot_tools.html#error_bar', 'dabest/plot_tools.py'),
'dabest.plot_tools.get_swarm_spans': ('API/plot_tools.html#get_swarm_spans', 'dabest/plot_tools.py'),
'dabest.plot_tools.grid_key_WIP': ('API/plot_tools.html#grid_key_wip', 'dabest/plot_tools.py'),
'dabest.plot_tools.halfviolin': ('API/plot_tools.html#halfviolin', 'dabest/plot_tools.py'),
'dabest.plot_tools.normalize_dict': ('API/plot_tools.html#normalize_dict', 'dabest/plot_tools.py'),
'dabest.plot_tools.plot_minimeta_or_deltadelta_violins': ( 'API/plot_tools.html#plot_minimeta_or_deltadelta_violins',
'dabest/plot_tools.py'),
'dabest.plot_tools.sankeydiag': ('API/plot_tools.html#sankeydiag', 'dabest/plot_tools.py'),
'dabest.plot_tools.single_sankey': ('API/plot_tools.html#single_sankey', 'dabest/plot_tools.py'),
'dabest.plot_tools.slopegraph_plotter': ( 'API/plot_tools.html#slopegraph_plotter',
'dabest/plot_tools.py'),
'dabest.plot_tools.summary_bars_plotter': ( 'API/plot_tools.html#summary_bars_plotter',
'dabest/plot_tools.py'),
'dabest.plot_tools.swarm_bars_plotter': ( 'API/plot_tools.html#swarm_bars_plotter',
'dabest/plot_tools.py'),
'dabest.plot_tools.swarmplot': ('API/plot_tools.html#swarmplot', 'dabest/plot_tools.py'),
'dabest.plot_tools.width_determine': ('API/plot_tools.html#width_determine', 'dabest/plot_tools.py')},
'dabest.plotter': {'dabest.plotter.effectsize_df_plotter': ('API/plotter.html#effectsize_df_plotter', 'dabest/plotter.py')}}}
2 changes: 2 additions & 0 deletions dabest/_stats_tools/confint_1group.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""A range of functions to compute bootstraps for a single sample."""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/API/confint_1group.ipynb.

# %% auto 0
Expand Down
2 changes: 2 additions & 0 deletions dabest/_stats_tools/confint_2group_diff.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""A range of functions to compute bootstraps for the mean difference"""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/API/confint_2group_diff.ipynb.

# %% auto 0
Expand Down
2 changes: 2 additions & 0 deletions dabest/_stats_tools/effsize.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""A range of functions to compute various effect sizes."""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/API/effsize.ipynb.

# %% ../../nbs/API/effsize.ipynb 4
Expand Down
2 changes: 2 additions & 0 deletions dabest/forest_plot.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Creating forest plots from contrast objects."""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/forest_plot.ipynb.

# %% auto 0
Expand Down
Loading
Loading