Skip to content

Commit 0991381

Browse files
committed
Fix a bug regarding the zero reference line
1 parent 42a83e9 commit 0991381

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

dabest/plotter.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,7 @@ def EffectSizeDataFramePlotter(EffectSizeDataFrame, **plot_kwargs):
769769
contrast_ylim_high, contrast_ylim_low = contrast_axes_ylim
770770
if contrast_ylim_low < 0 < contrast_ylim_high:
771771
contrast_axes.axhline(y=0, **reflines_kwargs)
772+
delta_axes.axhline(y=0, xmin = 0.25, xmax = 1.5, **reflines_kwargs)
772773

773774

774775
if delta2 and plot_kwargs['delta_ylim'] is not None:
@@ -789,14 +790,6 @@ def EffectSizeDataFramePlotter(EffectSizeDataFrame, **plot_kwargs):
789790
else:
790791
delta_axes.set_ylim(custom_delta_ylim)
791792

792-
if delta2:
793-
delta_axes_ylim = delta_axes.get_ylim()
794-
if delta_axes_ylim[0] < delta_axes_ylim[1]:
795-
delta_ylim_low, delta_ylim_high = delta_axes_ylim
796-
else:
797-
delta_ylim_high, delta_ylim_low = delta_axes_ylim
798-
if delta_ylim_low < 0 < delta_ylim_high:
799-
delta_axes.axhline(y=0, xmin = 0.25, xmax = 1.5, **reflines_kwargs)
800793

801794
if is_paired == "baseline" and show_pairs == True:
802795
rightend_ticks_raw = np.array([len(i)-1 for i in temp_idx]) + np.array(temp_ticks_to_skip)

0 commit comments

Comments
 (0)