@@ -1007,6 +1007,7 @@ def contrast_bars_plotter(results: object, ax_to_plot: object, swarm_plot_ax: o
10071007
10081008 unpacked_idx = [element for innerList in idx for element in innerList ]
10091009
1010+ # Colors
10101011 contrast_bars_colors = (
10111012 [contrast_bars_kwargs .get ('color' )] * int (max (ticks_to_plot ) + 1 )
10121013 if contrast_bars_kwargs .get ('color' ) is not None
@@ -1016,6 +1017,9 @@ def contrast_bars_plotter(results: object, ax_to_plot: object, swarm_plot_ax: o
10161017 )
10171018 contrast_bars_kwargs .pop ('color' )
10181019
1020+ # alpha
1021+ contrast_bars_kwargs ['alpha' ] = contrast_bars_kwargs .get ('alpha' , 0.15 if color_col is not None or is_paired else 0.25 )
1022+
10191023 for contrast_bars_x ,contrast_bars_y in zip (ticks_to_plot , contrast_means ):
10201024 idx_selector = (
10211025 int (contrast_bars_x )
@@ -1032,7 +1036,7 @@ def contrast_bars_plotter(results: object, ax_to_plot: object, swarm_plot_ax: o
10321036 if horizontal :
10331037 ax_to_plot .add_patch (mpatches .Rectangle ((0 , max (swarm_plot_ax .get_yticks ())- 0.5 ), diff , 0.5 , color = 'black' , ** contrast_bars_kwargs ))
10341038 else :
1035- ax_to_plot .add_patch (mpatches .Rectangle ((max (swarm_plot_ax .get_xticks ())+ 2 - 0.25 ,0 ),0.5 , diff , color = 'black' , ** contrast_bars_kwargs ))
1039+ ax_to_plot .add_patch (mpatches .Rectangle ((max (swarm_plot_ax .get_xticks ())+ 2 - 0.25 , 0 ), 0.5 , diff , color = 'black' , ** contrast_bars_kwargs ))
10361040
10371041 ax_to_plot .set_xlim (og_xlim )
10381042 ax_to_plot .set_ylim (og_ylim )
@@ -1075,6 +1079,7 @@ def swarm_bars_plotter(plot_data: object, xvar: str, yvar: str, ax: object,
10751079
10761080 unpacked_idx = [element for innerList in idx for element in innerList ]
10771081
1082+ # Colors
10781083 swarm_bars_colors = (
10791084 [swarm_bars_kwargs .get ('color' )] * (len (swarm_bars_order ) + 1 )
10801085 if swarm_bars_kwargs .get ('color' ) is not None
@@ -1084,6 +1089,9 @@ def swarm_bars_plotter(plot_data: object, xvar: str, yvar: str, ax: object,
10841089 )
10851090 swarm_bars_kwargs .pop ('color' )
10861091
1092+ # alpha
1093+ swarm_bars_kwargs ['alpha' ] = swarm_bars_kwargs .get ('alpha' , 0.15 if color_col is not None or is_paired else 0.25 )
1094+
10871095 for swarm_bars_x ,swarm_bars_y in zip (np .arange (0 ,len (swarm_bars_order )+ 1 ,1 ), swarm_means ):
10881096 idx_selector = (
10891097 swarm_bars_x
0 commit comments