Skip to content

Commit 871c00d

Browse files
authored
Merge pull request #203 from ACCLAB/feat-final-changes
Bug fixes Tutorials and readme updated Added tests Added additional arguments Major forest plot code updates and added features Trimmed various sections of code
2 parents 5641276 + 31c15d8 commit 871c00d

File tree

361 files changed

+4043
-2729
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

361 files changed

+4043
-2729
lines changed

CHANGELOG.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,30 @@
22

33
<!-- do not remove -->
44

5-
## v2025.03.14
5+
## v2025.03.27
66

77
### New Features
88

9-
- **Horizontal Plots**: This new feature allows users to create horizontal plots instead of the regular vertical plots, providing a more compact visualization of data. This can be utilized by setting `horizontal=True` in the `plot()` method.
9+
- **Horizontal Plots**: Users can now create horizontal layout plots, providing compact data visualization. This can be achieved by setting `horizontal=True` in the `plot()` method.
1010

11-
- **Forest Plots**: This new feature allows users to create forest plots! Forest plots provide a simple and intuitive way to visualize many delta-delta (or Deltas' g) or mini-meta effect sizes at once from multiple different dabest objects without presenting the raw data.
11+
- **Forest Plots**: Forest plots provide a simple and intuitive way to visualize many delta-delta (or Deltas g), mini-meta, or regular delta effect sizes at once from multiple different dabest objects without presenting the raw data.
1212

13-
- **Gridkey**: This new feature allows users to create a gridkey to represent the labels of the groups in the plot. This can be utilized with the `gridkey_rows` argument in the `plot()` method.
13+
- **Gridkey**: Users can now represent their experimental labels in a gridkey format. This can be accessed with the `gridkey` argument in the `plot()` method.
1414

1515
- **Aesthetic Updates**: We have made several aesthetic improvements to the plots, including:
16-
- **Swarm, Contrast, and Summary bars**: We have added bars to better highlight the various groups and their differences. These bars can be customized to suit the user's needs. The swarm and contrast bars are provided by default, while the summary bars can be added by the user.
16+
- **Raw, Contrast, and Summary bars**: We added bars highlighting the various groups' differences. These bars can be customized to suit the users needs. Raw and contrast bars are provided by default, summary bars can be added by the user.
1717

18-
- **Delta-Delta Plots**: We have modified the delta-delta plot format to be more compact and easier to read. The new format brings the delta-delta (or Deltas' g) effect size closer to the regular effect sizes. In addition, a gap has been added to the zeroline to separate the delta-delta and regular effect sizes.
18+
- **Delta-Delta and Mini-Meta Plots**: We have adjusted the spacing of delta-delta and mini-meta plots to reduce whitespace. The new format brings the added effect size closer to the regular effect sizes. In addition, delta-delta plots now have a gap in the zeroline to separate the delta-delta and regular effect sizes.
1919

20-
- **Delta-delta Effect Sizes for Proportion Plots**: Delta-delta effect sizes for proportion plots are now available.
21-
22-
- **Mini-Meta Plots**: We have modified the mini-meta plot format to be more compact and easier to read. The new format brings the mini-meta effect size closer to the regular effect sizes.
20+
- **Delta-delta Effect Sizes for Proportion Plots**: Delta-delta experimental plotting now supports binary data.
2321

24-
- **Proportion Plots Sample Sizes**: We have updated the proportion plots to show sample sizes for each group. These can be toggled on or off via the `prop_sample_counts` parameter.
22+
- **Proportion Plots Sample Sizes**: The sample size of each binary option for each group can now be displayed. These can be toggled on or off via the `prop_sample_counts` parameter.
2523

26-
- **Effect Size Lines for Paired Plots**: Effect size lines for paired plots are now available. These can be toggled on or off via the `es_paired_lines` parameter.
24+
- **Effect Size Lines for Paired Plots**: Paired plots now display lines linking the effect sizes within a group together in the contrast axes. These can be toggled on or off via the `contrast_paired_lines` parameter.
2725

28-
- **Baseline Error Curves**: Plots now include a baseline error dot and curve to show the error of the baseline/control group. By default, the dot is shown, while the curve can be added by the user (via the `show_baseline_ec` parameter).
26+
- **Baseline Error Curves**: Baseline error dot and curve are now available to represent the baseline/control group in the contrast axes. The dot is shown by default, while the curve can be toggled on/off by the user (via the `show_baseline_ec` parameter).
2927

30-
- **Delta Text**: There is now an option to display delta text on the contrast axes. It displays the effect size of the contrast group relative to the reference group. This can be toggled on or off via the `delta_text` parameter. It is on by default.
28+
- **Delta Text**: Effect size deltas are now displayed as text next to their respective effect size. This can be toggled on or off via the `delta_text` parameter.
3129

3230
- **Empty Circle Color Palette**: A new swarmplot color palette modification is available for unpaired plots via the `empty_circle` parameter in the `plot()` method. This option modifies the two-group swarmplots to have empty circles for the control group and filled circles for the experimental group.
3331

@@ -38,9 +36,10 @@
3836
- **Numba for Speed Improvements**: We have included Numba to speed up the various calculations in DABEST. This should make the calculations faster and more efficient. Importing DABEST may take a little longer than before, and a progress bar will appear during the import process to show the calculations being performed. Once imported, loading and plotting data should now be faster.
3937

4038
- **Terminology Updates**: We have made several updates to the documentation and terminology to improve clarity and consistency. For example:
41-
- The method to utilise the Deltas' g effect size is now via the `.hedges_g.plot()` method now rather than creating a whole new `Delta_g` object as before. The functionality remains the same, it plots hedges_g effect sizes and then the Deltas' g effect size alongside these (if a delta-delta experiment was loaded correctly).
39+
- Plot arguments have been adjusted to bring more clarity and consistency in naming. Arguments relating to the rawdata plot axis will now be typically referred to with ‘raw’ while arguments relating to the contrast axis will be referred to with ‘contrast’. For example, ‘raw_label’ replaces ‘swarm_label’ and ‘bar_label’. The various kwargs relating to each different type of plot (e.g., swarmplot_kwargs) remain unchanged.
40+
- The method to utilise the Deltas’ g effect size is now via the .hedges_g.plot() method rather than creating a whole new Delta_g object as before. The functionality remains the same, it plots hedges_g effect sizes and then the Deltas’ g effect size alongside these (if a delta-delta experiment was loaded correctly).
4241

43-
- **Updated Tutorial Pages**: We have updated the tutorial pages to reflect the new features and changes. The tutorial pages are now more comprehensive and hopefully more intuitive!.
42+
- **Updated Tutorial Pages**: We have updated the tutorial pages to reflect the new features and changes. The tutorial pages are now more comprehensive and (hopefully!) more intuitive!
4443

4544
- **Results Dataframe for Delta-delta and Mini-meta Plots**: A results dataframe can now be extracted for both the delta-delta and mini-meta effect size data (similar to the results dataframe for the regular effect sizes). These can be found via the `.results` attribute of the `.delta_delta` or `.mini_meta` object.
4645

README.md

Lines changed: 115 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -14,106 +14,132 @@ citation](https://zenodo.org/badge/DOI/10.1038/s41592-019-0470-3.svg)](https://r
1414

1515
## Recent Version Update
1616

17-
We are proud to announce **DABEST Version TBC (v2025.03.14)** This new
18-
version of the DABEST Python library provides several new features and
19-
includes performance improvements. It’s a big one!
20-
21-
1. **Python 3.13 Support**: DABEST now supports Python 3.10-3.13.
22-
23-
2. **Horizontal Plots**: This new feature allows users to create
24-
horizontal plots instead of the regular vertical plots, providing a
25-
more compact visualization of data. This can be utilized by setting
26-
`horizontal=True` in the `plot()` method. See the [Horizontal
27-
Plots](../tutorials/08-horizontal_plot.html) tutorial for more
28-
details.
29-
30-
3. **Forest Plots**: This new feature allows users to create forest
31-
plots! Forest plots provide a simple and intuitive way to visualize
32-
many delta-delta (or Deltas’ g) or mini-meta effect sizes at once
33-
from multiple different dabest objects without presenting the raw
34-
data. See the [Forest Plots](../tutorials/07-forest_plot.html)
35-
tutorial for more details.
36-
37-
4. **Gridkey**: This new feature allows users to create a gridkey to
38-
represent the labels of the groups in the plot. This can be utilized
39-
with the `gridkey_rows` argument in the `plot()` method. See the
40-
gridkey section in the [Plot
41-
Aesthetics](../tutorials/09-plot_aesthetics.html) tutorial for more
17+
We are proud to announce **DABEST Version Dadar (v2025.03.27)** This new
18+
version of the DABEST Python library includes several new features and
19+
performance improvements. It’s a big one!
20+
21+
1. **Python 3.13 Support**: DABEST now supports Python 3.10—3.13.
22+
23+
2. **Horizontal Plots**: Users can now create horizontal layout plots,
24+
providing compact data visualization. This can be achieved by
25+
setting `horizontal=True` in the `.plot()` method. See the
26+
[Horizontal Plots tutorial](../tutorials/08-horizontal_plot.html)
27+
for more details.
28+
29+
3. **Forest Plots**: Forest plots provide a simple and intuitive way to
30+
visualize many delta-delta (or delta *g*), mini-meta, or regular
31+
delta effect sizes at once from multiple different dabest objects
32+
without presenting the raw data. See the [Forest Plots
33+
tutorial](../tutorials/07-forest_plot.html) for more details.
34+
35+
4. **Gridkey**: Users can now represent experimental labels in a
36+
‘gridkey’ table. This can be accessed with the `gridkey` parameter
37+
in the `.plot()` method. See the gridkey section in the [Plot
38+
Aesthetics tutorial](../tutorials/09-plot_aesthetics.html) for more
4239
details.
4340

44-
5. **Aesthetic Updates**: We have made several aesthetic improvements
45-
to the plots, including:
46-
47-
- **Swarm, Contrast, and Summary bars**: We have added bars to
48-
better highlight the various groups and their differences. These
49-
bars can be customized to suit the user’s needs. The swarm and
50-
contrast bars are provided by default, while the summary bars can
51-
be added by the user. See the relevant sections in the [Plot
52-
Aesthetics](../tutorials/09-plot_aesthetics.html) tutorial for
53-
more details.
54-
55-
- **Delta-Delta Plots**: We have modified the delta-delta plot
56-
format to be more compact and easier to read. The new format
57-
brings the delta-delta (or Deltas’ g) effect size closer to the
58-
regular effect sizes. In addition, a gap has been added to the
59-
zeroline to separate the delta-delta and regular effect sizes.
60-
61-
- **Delta-delta Effect Sizes for Proportion Plots**: Delta-delta
62-
effect sizes for proportion plots are now available.
63-
64-
- **Mini-Meta Plots**: We have modified the mini-meta plot format to
65-
be more compact and easier to read. The new format brings the
66-
mini-meta effect size closer to the regular effect sizes.
67-
68-
- **Proportion Plots Sample Sizes**: We have updated the proportion
69-
plots to show sample sizes for each group. These can be toggled on
70-
or off via the `prop_sample_counts` parameter.
71-
72-
- **Effect Size Lines for Paired Plots**: Effect size lines for
73-
paired plots are now available. These can be toggled on or off via
74-
the `es_paired_lines` parameter.
75-
76-
- **Baseline Error Curves**: Plots now include a baseline error dot
77-
and curve to show the error of the baseline/control group. By
78-
default, the dot is shown, while the curve can be added by the
79-
user (via the `show_baseline_ec` parameter).
80-
81-
- **Delta Text**: There is now an option to display delta text on
82-
the contrast axes. It displays the effect size of the contrast
83-
group relative to the reference group. This can be toggled on or
84-
off via the `delta_text` parameter. It is on by default.
85-
86-
- **Empty Circle Color Palette**: A new swarmplot color palette
41+
5. **Other Visualization Improvements**:
42+
43+
- **Comparing means and effect sizes**: The estimation plots now
44+
include three types of customizable visual features to enhance
45+
contextualization and comparison of means and effect sizes:
46+
47+
- **Bars for the mean of the observed values (`raw_bars`)**:
48+
Colored rectangles that extend from the zero line to the mean of
49+
each group’s raw data. These bars visually highlight the central
50+
tendency of the raw data.
51+
52+
- **Bars for effect size/s (`contrast_bars`)**: Similar to raw
53+
bars, these highlight the effect-size difference between two
54+
groups (typically test and control) in the contrast axis. They
55+
provide a visual representation of the differences between
56+
groups.
57+
58+
- **Summary bands (`reference_band`)**: An optional band or ribbon
59+
that can be added to emphasize a specific effect size’s
60+
confidence interval that is used as a reference range across the
61+
entire contrast axis. Unlike raw and contrast bars, these span
62+
horizontally (or vertically if `horizontal=True`) and are not
63+
displayed by default.
64+
65+
Raw and contrast bars are shown by default. Users can customize
66+
these bars and add summary bands as needed. For detailed
67+
customization instructions, please refer to the [Plot Aesthetics
68+
tutorial](../tutorials/09-plot_aesthetics.html).
69+
70+
- **Tighter spacing in delta-delta and mini-meta plots**: We have
71+
adjusted the spacing of delta-delta and mini-meta plots to reduce
72+
whitespace. The new format brings the overall effect size closer
73+
to the two-groups effect sizes. In addition, delta-delta plots now
74+
have a gap in the zero line to separate the delta-delta from the ∆
75+
effect sizes.
76+
77+
- **Delta-delta effect sizes for proportion plots**: In addition to
78+
continuous data, delta-delta plots now support binary data
79+
(proportions). This means that 2-way designs for binary outcomes
80+
can be analyzed with DABEST.
81+
82+
- **Proportion plots sample sizes**: The sample size of each binary
83+
option for each group can now be displayed. These can be toggled
84+
on/off via the `prop_sample_counts` parameter.
85+
86+
- **Effect size lines for paired plots**: Along with lines
87+
connecting paired observed values, the paired plots now also
88+
display lines linking the effect sizes within a group in the
89+
contrast axes. These lines can be toggled on/off via the
90+
`contrast_paired_lines` parameter.
91+
92+
- **Baseline error curves**: To represent the baseline/control group
93+
in the contrast axes, it is now possible to plot the baseline dot
94+
and the baseline error curve. The dot is shown by default, while
95+
the curve can be toggled on/off via the `show_baseline_ec`
96+
parameter. This dot helps make it clear where the baseline comes
97+
from i.e. the control minus itself. The baseline error curve can
98+
be used to show that the baseline itself is an estimate inferred
99+
from the observed values of the control data.
100+
101+
- **Delta text**: Effect-size deltas (e.g. mean differences) are now
102+
displayed as numerals next to their respective effect size. This
103+
can be toggled on/off via the `delta_text` parameter.
104+
105+
- **Empty circle color palette**: A new swarmplot color palette
87106
modification is available for unpaired plots via the
88-
`empty_circle` parameter in the `plot()` method. This option
107+
`empty_circle` parameter in the `.plot()` method. This option
89108
modifies the two-group swarmplots to have empty circles for the
90109
control group and filled circles for the experimental group.
91110

92111
6. **Miscellaneous Improvements & Adjustments**
93112

94-
- **Numba for Speed Improvements**: We have included Numba to speed
95-
up the various calculations in DABEST. This should make the
96-
calculations faster and more efficient. Importing DABEST may take
97-
a little longer than before, and a progress bar will appear during
98-
the import process to show the calculations being performed. Once
99-
imported, loading and plotting data should now be faster.
100-
101-
- **Terminology Updates**: We have made several updates to the
102-
documentation and terminology to improve clarity and consistency.
103-
For example:
104-
105-
- The method to utilise the Deltas’ g effect size is now via the
106-
`.hedges_g.plot()` method now rather than creating a whole new
107-
`Delta_g` object as before. The functionality remains the same,
108-
it plots hedges_g effect sizes and then the Deltas’ g effect
109-
size alongside these (if a delta-delta experiment was loaded
113+
- **Numba for speed improvements**: We have added
114+
[Numba](https://numba.pydata.org/) to speed up the various
115+
calculations in DABEST. Precalculations will be performed during
116+
import, which will help speed up the subsequent loading and
117+
plotting of data.
118+
119+
- **Terminology/naming updates**: During the refactoring of the
120+
code, we have made several updates to the documentation and
121+
terminology to improve clarity and consistency. For example:
122+
123+
- Plot arguments have been adjusted to bring more clarity and
124+
consistency in naming. Arguments relating to the rawdata plot
125+
axis will now be typically referred to with `raw` while
126+
arguments relating to the contrast axis will be referred to with
127+
`contrast`. For example, `raw_label` replaces `swarm_label` and
128+
`bar_label`. The various kwargs relating to each different type
129+
of plot (e.g., `swarmplot_kwargs`) remain unchanged.
130+
131+
- The method to utilise the Delta *g* effect size is now via the
132+
.hedges_g.plot() method rather than creating a whole new Delta_g
133+
object as before. The functionality remains the same, it plots
134+
hedges_g effect sizes and then the Delta *g* effect size
135+
alongside these (if a delta-delta experiment was loaded
110136
correctly).
111137

112-
- **Updated Tutorial Pages**: We have updated the tutorial pages to
138+
- **Updated tutorial pages**: We have updated the tutorial pages to
113139
reflect the new features and changes. The tutorial pages are now
114-
more comprehensive and hopefully more intuitive!.
140+
more comprehensive and (hopefully!) more intuitive!
115141

116-
- **Results Dataframe for Delta-delta and Mini-meta Plots**: A
142+
- **Results dataframe for delta-delta and mini-meta plots**: A
117143
results dataframe can now be extracted for both the delta-delta
118144
and mini-meta effect size data (similar to the results dataframe
119145
for the regular effect sizes). These can be found via the
@@ -165,7 +191,7 @@ allowing everyone access to high-quality estimation plots.
165191

166192
## Installation
167193

168-
This package is tested on Python 3.10 and onwards. It is highly
194+
This package is tested on Python 3.11 and onwards. It is highly
169195
recommended to download the [Anaconda
170196
distribution](https://www.continuum.io/downloads) of Python in order to
171197
obtain the dependencies easily.

dabest/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from ._stats_tools import confint_2group_diff as ci_2g
44
from ._effsize_objects import TwoGroupsEffectSize, PermutationTest
55
from ._dabest_object import Dabest
6+
from .forest_plot import forest_plot
67

78

89
import os
@@ -11,4 +12,4 @@
1112
if not _NUMBA_COMPILED:
1213
precompile_all()
1314

14-
__version__ = "2025.03.14"
15+
__version__ = "2025.03.27"

0 commit comments

Comments
 (0)