@@ -166,13 +166,12 @@ def get_params(effectsize_df, plot_kwargs):
166166 float_contrast = False
167167
168168 # Contrast Axes kwargs
169- es_marker_size = plot_kwargs ["es_marker_size" ]
170169 halfviolin_alpha = plot_kwargs ["halfviolin_alpha" ]
171170 ci_type = plot_kwargs ["ci_type" ]
172171
173172 return (dabest_obj , plot_data , xvar , yvar , is_paired , effect_size , proportional , all_plot_groups , idx ,
174173 show_delta2 , show_mini_meta , float_contrast , show_pairs , effect_size_type , group_summaries , err_color , horizontal ,
175- results , es_marker_size , halfviolin_alpha , ci_type , x1_level , experiment_label )
174+ results , halfviolin_alpha , ci_type , x1_level , experiment_label )
176175
177176def get_kwargs (plot_kwargs , ytick_color ):
178177 """
@@ -233,6 +232,7 @@ def get_kwargs(plot_kwargs, ytick_color):
233232 "vert" : True ,
234233 "showextrema" : False ,
235234 "showmedians" : False ,
235+
236236 }
237237 if plot_kwargs ["violinplot_kwargs" ] is None :
238238 violinplot_kwargs = default_violinplot_kwargs
@@ -292,17 +292,19 @@ def get_kwargs(plot_kwargs, ytick_color):
292292 "group_summaries must be one of" " these: {}." .format (gs_default )
293293 )
294294
295- default_group_summary_kwargs = {
295+ default_group_summaries_kwargs = {
296296 "zorder" : 3 ,
297297 "lw" : 2 ,
298298 "alpha" : 1 ,
299299 'gap_width_percent' : 1.5 ,
300+ 'offset' : 0.1 ,
301+ 'color' : None
300302 }
301- if plot_kwargs ["group_summary_kwargs " ] is None :
302- group_summary_kwargs = default_group_summary_kwargs
303+ if plot_kwargs ["group_summaries_kwargs " ] is None :
304+ group_summaries_kwargs = default_group_summaries_kwargs
303305 else :
304- group_summary_kwargs = merge_two_dicts (
305- default_group_summary_kwargs , plot_kwargs ["group_summary_kwargs " ]
306+ group_summaries_kwargs = merge_two_dicts (
307+ default_group_summaries_kwargs , plot_kwargs ["group_summaries_kwargs " ]
306308 )
307309
308310 # Redraw axes kwargs.
@@ -404,10 +406,37 @@ def get_kwargs(plot_kwargs, ytick_color):
404406 else :
405407 gridkey_kwargs = merge_two_dicts (default_gridkey_kwargs , plot_kwargs ["gridkey_kwargs" ])
406408
409+ # Effect size marker kwargs
410+ default_es_marker_kwargs = {
411+ 'marker' : 'o' ,
412+ 'markersize' : plot_kwargs ['es_marker_size' ],
413+ 'color' : ytick_color ,
414+ 'alpha' : 1 ,
415+ 'zorder' : 1 ,
416+ }
417+ if plot_kwargs ['es_marker_kwargs' ] is None :
418+ es_marker_kwargs = default_es_marker_kwargs
419+ else :
420+ es_marker_kwargs = merge_two_dicts (default_es_marker_kwargs , plot_kwargs ['es_marker_kwargs' ])
421+
422+ # Effect size error bar kwargs
423+ default_es_errorbar_kwargs = {
424+ 'color' : ytick_color ,
425+ 'lw' : 2 ,
426+ 'linestyle' : '-' ,
427+ 'alpha' : 1 ,
428+ 'zorder' : 1 ,
429+ }
430+ if plot_kwargs ['es_errorbar_kwargs' ] is None :
431+ es_errorbar_kwargs = default_es_errorbar_kwargs
432+ else :
433+ es_errorbar_kwargs = merge_two_dicts (default_es_errorbar_kwargs , plot_kwargs ['es_errorbar_kwargs' ])
434+
407435 # Return the kwargs.
408436 return (swarmplot_kwargs , barplot_kwargs , sankey_kwargs , violinplot_kwargs , slopegraph_kwargs ,
409- reflines_kwargs , legend_kwargs , group_summary_kwargs , redraw_axes_kwargs , delta_dot_kwargs ,
410- delta_text_kwargs , summary_bars_kwargs , swarm_bars_kwargs , contrast_bars_kwargs , table_kwargs , gridkey_kwargs )
437+ reflines_kwargs , legend_kwargs , group_summaries_kwargs , redraw_axes_kwargs , delta_dot_kwargs ,
438+ delta_text_kwargs , summary_bars_kwargs , swarm_bars_kwargs , contrast_bars_kwargs , table_kwargs , gridkey_kwargs ,
439+ es_marker_kwargs , es_errorbar_kwargs )
411440
412441
413442def get_color_palette (plot_kwargs , plot_data , xvar , show_pairs , idx , all_plot_groups ):
@@ -1539,7 +1568,7 @@ def Redraw_Spines(rawdata_axes, contrast_axes, redraw_axes_kwargs, float_contras
15391568
15401569def extract_group_summaries (proportional , err_color , rawdata_axes , asymmetric_side , horizontal ,
15411570 bootstraps_color_by_group , plot_palette_raw , all_plot_groups ,
1542- n_groups , color_col , ytick_color , plot_kwargs ):
1571+ n_groups , color_col , ytick_color , group_summaries_kwargs ):
15431572
15441573 from .plot_tools import get_swarm_spans
15451574
@@ -1582,7 +1611,11 @@ def extract_group_summaries(proportional, err_color, rawdata_axes, asymmetric_si
15821611 xspans = xspans [:len (all_plot_groups )]
15831612
15841613 group_summaries_method = "gapped_lines"
1585- group_summaries_offset = xspans + np .array (plot_kwargs [ "group_summaries_offset " ])
1614+ group_summaries_offset = xspans + np .array (group_summaries_kwargs [ "offset " ])
15861615 group_summaries_line_color = line_colors
15871616
1617+ if group_summaries_kwargs ['color' ] is not None :
1618+ group_summaries_line_color = group_summaries_kwargs .pop ("color" )
1619+ group_summaries_kwargs .pop ("offset" )
1620+
15881621 return group_summaries_method , group_summaries_offset , group_summaries_line_color
0 commit comments