Skip to content

Commit bb090ae

Browse files
committed
Added gap_width_percent to group_summary_kwargs so that users can specify the gapped line gap size
1 parent d768b60 commit bb090ae

File tree

6 files changed

+6
-14
lines changed

6 files changed

+6
-14
lines changed

dabest/_effsize_objects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ def plot(
11551155
command here, as a dict. This will change the appearance of the
11561156
vertical summary lines for each group, if `group_summaries` is not
11571157
'None'. If None, the following keywords are passed to
1158-
matplotlib.lines.Line2D : {'lw':2, 'alpha':1, 'zorder':3}.
1158+
matplotlib.lines.Line2D : {'lw':2, 'alpha':1, 'zorder':3, 'gap_width_percent':1.5}.
11591159
legend_kwargs : dict, default None
11601160
Pass any keyword arguments accepted by the matplotlib Axes
11611161
`legend` command here, as a dict. If None, the following keywords

dabest/misc_tools.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ def get_kwargs(plot_kwargs, ytick_color):
295295
default_group_summary_kwargs = {
296296
"zorder": 3,
297297
"lw": 2,
298-
"alpha": 1
298+
"alpha": 1,
299+
'gap_width_percent': 1.5,
299300
}
300301
if plot_kwargs["group_summary_kwargs"] is None:
301302
group_summary_kwargs = default_group_summary_kwargs

dabest/plotter.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ def effectsize_df_plotter(effectsize_df, **plot_kwargs):
4545
fig_size=None,
4646
dpi=100,
4747
ax=None,
48-
49-
5048
gridkey_rows=None, gridkey_kwargs=None,
51-
52-
5349
swarmplot_kwargs=None,
5450
violinplot_kwargs=None,
5551
slopegraph_kwargs=None,
@@ -306,7 +302,6 @@ def effectsize_df_plotter(effectsize_df, **plot_kwargs):
306302
y=yvar,
307303
offset=group_summaries_offset,
308304
line_color=group_summaries_line_color,
309-
gap_width_percent=1.5,
310305
type=group_summaries,
311306
ax=rawdata_axes,
312307
method=group_summaries_method,

nbs/API/effsize_objects.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,7 @@
13141314
" command here, as a dict. This will change the appearance of the\n",
13151315
" vertical summary lines for each group, if `group_summaries` is not\n",
13161316
" 'None'. If None, the following keywords are passed to\n",
1317-
" matplotlib.lines.Line2D : {'lw':2, 'alpha':1, 'zorder':3}.\n",
1317+
" matplotlib.lines.Line2D : {'lw':2, 'alpha':1, 'zorder':3, 'gap_width_percent':1.5}.\n",
13181318
" legend_kwargs : dict, default None\n",
13191319
" Pass any keyword arguments accepted by the matplotlib Axes\n",
13201320
" `legend` command here, as a dict. If None, the following keywords\n",

nbs/API/misc_tools.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,8 @@
348348
" default_group_summary_kwargs = {\n",
349349
" \"zorder\": 3, \n",
350350
" \"lw\": 2, \n",
351-
" \"alpha\": 1\n",
351+
" \"alpha\": 1,\n",
352+
" 'gap_width_percent': 1.5,\n",
352353
" }\n",
353354
" if plot_kwargs[\"group_summary_kwargs\"] is None:\n",
354355
" group_summary_kwargs = default_group_summary_kwargs\n",

nbs/API/plotter.ipynb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,7 @@
102102
" fig_size=None,\n",
103103
" dpi=100,\n",
104104
" ax=None,\n",
105-
"\n",
106-
"\n",
107105
" gridkey_rows=None, gridkey_kwargs=None,\n",
108-
"\n",
109-
"\n",
110106
" swarmplot_kwargs=None,\n",
111107
" violinplot_kwargs=None,\n",
112108
" slopegraph_kwargs=None,\n",
@@ -363,7 +359,6 @@
363359
" y=yvar,\n",
364360
" offset=group_summaries_offset,\n",
365361
" line_color=group_summaries_line_color,\n",
366-
" gap_width_percent=1.5,\n",
367362
" type=group_summaries,\n",
368363
" ax=rawdata_axes,\n",
369364
" method=group_summaries_method,\n",

0 commit comments

Comments
 (0)