Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions dabest/misc_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ def initialize_fig(
raw_label = plot_kwargs["raw_label"]
if raw_label is None:
if proportional:
raw_label = "Proportion of Success" if effect_size_type != "cohens_h" else "Value"
raw_label = "Proportion of success" if effect_size_type != "cohens_h" else "Value"
else:
raw_label = yvar

Expand All @@ -951,16 +951,16 @@ def initialize_fig(

# Set contrast axes y-label.
contrast_label_dict = {
"mean_diff": "Mean Difference",
"median_diff": "Median Difference",
"mean_diff": "Mean difference",
"median_diff": "Median difference",
"cohens_d": "Cohen's d",
"hedges_g": "Hedges' g",
"cliffs_delta": "Cliff's delta",
"cohens_h": "Cohen's h",
}

if proportional and effect_size_type != "cohens_h":
default_contrast_label = "Proportion Difference"
default_contrast_label = "Proportion difference"
else:
default_contrast_label = contrast_label_dict[effect_size_type]

Expand Down
12 changes: 6 additions & 6 deletions dabest/plot_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1333,31 +1333,31 @@ def extract_curve_data(dabest_object):
if horizontal:
current_ylabels = rawdata_axes.get_yticklabels()
if type == 'mini_meta':
current_ylabels.extend(["Weighted Delta"])
current_ylabels.extend(["Weighted delta"])
elif effect_size == "hedges_g":
current_ylabels.extend(["Delta g"])
else:
current_ylabels.extend(["Delta-Delta"])
current_ylabels.extend(["Delta-delta"])

rawdata_axes.set_yticks(np.append(rawdata_axes.get_yticks(), position))
rawdata_axes.set_yticklabels(current_ylabels)
else:
if type == 'mini_meta':
if show_pairs:
contrast_xtick_labels.extend(["Weighted\n Delta"])
contrast_xtick_labels.extend(["Weighted\n delta"])
else:
contrast_xtick_labels.extend(["Weighted Delta"])
contrast_xtick_labels.extend(["Weighted delta"])
elif effect_size == "hedges_g":
contrast_xtick_labels.extend(["Delta g"])
else:
contrast_xtick_labels.extend(["Delta-Delta"])
contrast_xtick_labels.extend(["Delta-delta"])

# Create the delta-delta axes.
if type == 'delta_delta' and not horizontal:
if plot_kwargs["delta2_label"] is not None:
delta2_label = plot_kwargs["delta2_label"]
elif effect_size == "mean_diff":
delta2_label = "Delta-Delta"
delta2_label = "Delta-delta"
else:
delta2_label = "Delta g"
fontsize_delta2label = plot_kwargs["fontsize_delta2label"]
Expand Down
8 changes: 4 additions & 4 deletions nbs/API/misc_tools.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@
" raw_label = plot_kwargs[\"raw_label\"]\n",
" if raw_label is None:\n",
" if proportional:\n",
" raw_label = \"Proportion of Success\" if effect_size_type != \"cohens_h\" else \"Value\"\n",
" raw_label = \"Proportion of success\" if effect_size_type != \"cohens_h\" else \"Value\"\n",
" else:\n",
" raw_label = yvar \n",
"\n",
Expand All @@ -1004,16 +1004,16 @@
"\n",
" # Set contrast axes y-label.\n",
" contrast_label_dict = {\n",
" \"mean_diff\": \"Mean Difference\",\n",
" \"median_diff\": \"Median Difference\",\n",
" \"mean_diff\": \"Mean difference\",\n",
" \"median_diff\": \"Median difference\",\n",
" \"cohens_d\": \"Cohen's d\",\n",
" \"hedges_g\": \"Hedges' g\",\n",
" \"cliffs_delta\": \"Cliff's delta\",\n",
" \"cohens_h\": \"Cohen's h\",\n",
" }\n",
"\n",
" if proportional and effect_size_type != \"cohens_h\":\n",
" default_contrast_label = \"Proportion Difference\"\n",
" default_contrast_label = \"Proportion difference\"\n",
" else:\n",
" default_contrast_label = contrast_label_dict[effect_size_type]\n",
"\n",
Expand Down
12 changes: 6 additions & 6 deletions nbs/API/plot_tools.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1384,31 +1384,31 @@
" if horizontal:\n",
" current_ylabels = rawdata_axes.get_yticklabels()\n",
" if type == 'mini_meta':\n",
" current_ylabels.extend([\"Weighted Delta\"])\n",
" current_ylabels.extend([\"Weighted delta\"])\n",
" elif effect_size == \"hedges_g\":\n",
" current_ylabels.extend([\"Delta g\"])\n",
" else:\n",
" current_ylabels.extend([\"Delta-Delta\"])\n",
" current_ylabels.extend([\"Delta-delta\"])\n",
"\n",
" rawdata_axes.set_yticks(np.append(rawdata_axes.get_yticks(), position))\n",
" rawdata_axes.set_yticklabels(current_ylabels)\n",
" else:\n",
" if type == 'mini_meta':\n",
" if show_pairs:\n",
" contrast_xtick_labels.extend([\"Weighted\\n Delta\"])\n",
" contrast_xtick_labels.extend([\"Weighted\\n delta\"])\n",
" else:\n",
" contrast_xtick_labels.extend([\"Weighted Delta\"])\n",
" contrast_xtick_labels.extend([\"Weighted delta\"])\n",
" elif effect_size == \"hedges_g\":\n",
" contrast_xtick_labels.extend([\"Delta g\"])\n",
" else:\n",
" contrast_xtick_labels.extend([\"Delta-Delta\"])\n",
" contrast_xtick_labels.extend([\"Delta-delta\"])\n",
"\n",
" # Create the delta-delta axes.\n",
" if type == 'delta_delta' and not horizontal:\n",
" if plot_kwargs[\"delta2_label\"] is not None:\n",
" delta2_label = plot_kwargs[\"delta2_label\"]\n",
" elif effect_size == \"mean_diff\":\n",
" delta2_label = \"Delta-Delta\"\n",
" delta2_label = \"Delta-delta\"\n",
" else:\n",
" delta2_label = \"Delta g\"\n",
" fontsize_delta2label = plot_kwargs[\"fontsize_delta2label\"]\n",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified nbs/tests/mpl_image_tests/baseline_images/test_113_desat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified nbs/tests/mpl_image_tests/baseline_images/test_115_invert_ylim.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified nbs/tests/mpl_image_tests/baseline_images/test_117_err_color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified nbs/tests/mpl_image_tests/baseline_images/test_119_wide_df_nan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified nbs/tests/mpl_image_tests/baseline_images/test_11_inset_plots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified nbs/tests/mpl_image_tests/baseline_images/test_120_long_df_nan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified nbs/tests/mpl_image_tests/baseline_images/test_130_zero_to_one.png
Binary file modified nbs/tests/mpl_image_tests/baseline_images/test_131_one_to_zero.png
Binary file modified nbs/tests/mpl_image_tests/baseline_images/test_18_desat.png
Binary file modified nbs/tests/mpl_image_tests/baseline_images/test_19_dot_sizes.png
Binary file modified nbs/tests/mpl_image_tests/baseline_images/test_20_change_ylims.png
Binary file modified nbs/tests/mpl_image_tests/baseline_images/test_24_wide_df_nan.png
Binary file modified nbs/tests/mpl_image_tests/baseline_images/test_325_wide_df_nan.png
Binary file modified nbs/tests/mpl_image_tests/baseline_images/test_326_long_df_nan.png
Binary file modified nbs/tests/mpl_image_tests/baseline_images/test_99_style_sheets.png
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[build-system]
requires = ["setuptools>=64.0"]
build-backend = "setuptools.build_meta"

[project]
name="dabest"
requires-python=">=3.10"
dynamic = [ "keywords", "description", "version", "dependencies", "optional-dependencies", "readme", "license", "authors", "classifiers", "entry-points", "scripts", "urls"]

[tool.uv]
cache-keys = [{ file = "pyproject.toml" }, { file = "settings.ini" }, { file = "setup.py" }]