Skip to content

Commit 1c84c9a

Browse files
committed
Inherit errorbar alpha from scatter points in regplot
Closes #2540 by adding a test.
1 parent b9c7fae commit 1c84c9a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

doc/releases/v0.12.0.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ Other updates
5353

5454
- |Enhancement| When using :func:`pairplot` with `corner=True` and `diag_kind=None`, the top left y axis label is no longer hidden (:pr:2850`).
5555

56+
- |Enhancement| Error bars in :func:`regplot` now inherit the alpha value of the points they correspond to (:pr:`2540`).
57+
5658
- |Fix| Fixed a regression in 0.11.2 that caused some functions to stall indefinitely or raise when the input data had a duplicate index (:pr:`2776`).
5759

5860
- |Fix| Fixed a bug in :func:`histplot` and :func:`kdeplot` where weights were not factored into the normalization (:pr:`2812`).

tests/test_regression.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,14 @@ def test_regplot_scatter_kws_alpha(self):
522522
scatter_kws={'color': color})
523523
assert ax.collections[0]._alpha == 0.8
524524

525+
f, ax = plt.subplots()
526+
alpha = .3
527+
ax = lm.regplot(x="x", y="y", data=self.df,
528+
x_bins=5, fit_reg=False,
529+
scatter_kws={"alpha": alpha})
530+
for line in ax.lines:
531+
assert line.get_alpha() == alpha
532+
525533
def test_regplot_binned(self):
526534

527535
ax = lm.regplot(x="x", y="y", data=self.df, x_bins=5)

0 commit comments

Comments
 (0)