Skip to content

Commit

Permalink
Merge pull request #86 from DizietAsahi/master
Browse files Browse the repository at this point in the history
Honor reflines_kwargs when float_contrast=False
  • Loading branch information
josesho committed Dec 20, 2019
2 parents 0391fee + cf377d0 commit 7015b81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions dabest/_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,12 @@ def plot(self, color_col=None,
pyplot.violinplot` command here, as a dict. If None, the following
keywords are passed to violinplot : {'widths':0.5, 'vert':True,
'showextrema':False, 'showmedians':False}.
slopegraph_kwargs : dict, default None
This will change the appearance of the lines used to join each pair
of observations when `show_pairs=True`. Pass any keyword arguments
accepted by matplotlib `plot()` function here, as a dict.
If None, the following keywords are
passed to plot() : {'linewidth':1, 'alpha':0.5}.
reflines_kwargs : dict, default None
This will change the appearance of the zero reference lines. Pass
any keyword arguments accepted by the matplotlib Axes `hlines`
Expand Down
4 changes: 2 additions & 2 deletions dabest/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def EffectSizeDataFramePlotter(EffectSizeDataFrame, **plot_kwargs):
if plot_kwargs["slopegraph_kwargs"] is None:
slopegraph_kwargs = default_slopegraph_kwargs
else:
slopegraph_kwargs = merge_two_dicts(slopegraph_kwargs,
slopegraph_kwargs = merge_two_dicts(default_slopegraph_kwargs,
plot_kwargs["slopegraph_kwargs"])


Expand Down Expand Up @@ -697,7 +697,7 @@ def EffectSizeDataFramePlotter(EffectSizeDataFrame, **plot_kwargs):
else:
contrast_ylim_high, contrast_ylim_low = contrast_axes_ylim
if contrast_ylim_low < 0 < contrast_ylim_high:
contrast_axes.axhline(y=0, lw=0.75, color=ytick_color)
contrast_axes.axhline(y=0, **reflines_kwargs)

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

0 comments on commit 7015b81

Please sign in to comment.