Skip to content

Commit 7015b81

Browse files
authored
Merge pull request #86 from DizietAsahi/master
Honor reflines_kwargs when float_contrast=False
2 parents 0391fee + cf377d0 commit 7015b81

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

dabest/_classes.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,6 +1209,12 @@ def plot(self, color_col=None,
12091209
pyplot.violinplot` command here, as a dict. If None, the following
12101210
keywords are passed to violinplot : {'widths':0.5, 'vert':True,
12111211
'showextrema':False, 'showmedians':False}.
1212+
slopegraph_kwargs : dict, default None
1213+
This will change the appearance of the lines used to join each pair
1214+
of observations when `show_pairs=True`. Pass any keyword arguments
1215+
accepted by matplotlib `plot()` function here, as a dict.
1216+
If None, the following keywords are
1217+
passed to plot() : {'linewidth':1, 'alpha':0.5}.
12121218
reflines_kwargs : dict, default None
12131219
This will change the appearance of the zero reference lines. Pass
12141220
any keyword arguments accepted by the matplotlib Axes `hlines`

dabest/plotter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def EffectSizeDataFramePlotter(EffectSizeDataFrame, **plot_kwargs):
130130
if plot_kwargs["slopegraph_kwargs"] is None:
131131
slopegraph_kwargs = default_slopegraph_kwargs
132132
else:
133-
slopegraph_kwargs = merge_two_dicts(slopegraph_kwargs,
133+
slopegraph_kwargs = merge_two_dicts(default_slopegraph_kwargs,
134134
plot_kwargs["slopegraph_kwargs"])
135135

136136

@@ -697,7 +697,7 @@ def EffectSizeDataFramePlotter(EffectSizeDataFrame, **plot_kwargs):
697697
else:
698698
contrast_ylim_high, contrast_ylim_low = contrast_axes_ylim
699699
if contrast_ylim_low < 0 < contrast_ylim_high:
700-
contrast_axes.axhline(y=0, lw=0.75, color=ytick_color)
700+
contrast_axes.axhline(y=0, **reflines_kwargs)
701701

702702
# Compute the end of each x-axes line.
703703
rightend_ticks = np.array([len(i)-1 for i in idx]) + np.array(ticks_to_skip)

0 commit comments

Comments
 (0)