Skip to content

Commit

Permalink
minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
JAnns98 committed Sep 9, 2024
1 parent c5f8bd2 commit b5542bc
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
17 changes: 17 additions & 0 deletions dabest/misc_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ def get_varname(obj):
return ""

def get_params(effectsize_df, plot_kwargs):
"""
Parameters
----------
effectsize_df : object (Dataframe)
A `dabest` EffectSizeDataFrame object.
plot_kwargs : dict
Kwargs passed to the plot function.
"""
face_color = plot_kwargs["face_color"]

if plot_kwargs["face_color"] is None:
Expand Down Expand Up @@ -122,11 +130,20 @@ def get_params(effectsize_df, plot_kwargs):
show_pairs = False
else:
show_pairs = plot_kwargs["show_pairs"]


return (face_color, dabest_obj, plot_data, xvar, yvar, is_paired, effect_size, proportional, all_plot_groups, idx,
show_delta2, show_mini_meta, float_contrast, show_pairs, effect_size_type)

def get_kwargs(plot_kwargs, ytick_color):
"""
Parameters
----------
plot_kwargs : dict
Kwargs passed to the plot function.
ytick_color : str
Color of the yticks.
"""
from .misc_tools import merge_two_dicts

# Swarmplot kwargs
Expand Down
17 changes: 17 additions & 0 deletions nbs/API/misc_tools.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@
" return \"\"\n",
"\n",
"def get_params(effectsize_df, plot_kwargs):\n",
" \"\"\"\n",
" Parameters\n",
" ----------\n",
" effectsize_df : object (Dataframe)\n",
" A `dabest` EffectSizeDataFrame object.\n",
" plot_kwargs : dict\n",
" Kwargs passed to the plot function.\n",
" \"\"\"\n",
" face_color = plot_kwargs[\"face_color\"]\n",
"\n",
" if plot_kwargs[\"face_color\"] is None:\n",
Expand Down Expand Up @@ -179,11 +187,20 @@
" show_pairs = False\n",
" else:\n",
" show_pairs = plot_kwargs[\"show_pairs\"]\n",
" \n",
"\n",
" return (face_color, dabest_obj, plot_data, xvar, yvar, is_paired, effect_size, proportional, all_plot_groups, idx, \n",
" show_delta2, show_mini_meta, float_contrast, show_pairs, effect_size_type)\n",
"\n",
"def get_kwargs(plot_kwargs, ytick_color):\n",
" \"\"\"\n",
" Parameters\n",
" ----------\n",
" plot_kwargs : dict\n",
" Kwargs passed to the plot function.\n",
" ytick_color : str\n",
" Color of the yticks.\n",
" \"\"\"\n",
" from .misc_tools import merge_two_dicts\n",
"\n",
" # Swarmplot kwargs\n",
Expand Down

0 comments on commit b5542bc

Please sign in to comment.