Skip to content

Commit 2c3ea6f

Browse files
authored
Switch barplot tests from ci to errorbar. (#2949)
1 parent 72d1322 commit 2c3ea6f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tests/test_categorical.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2354,8 +2354,8 @@ def test_draw_missing_bars(self):
23542354
def test_unaligned_index(self):
23552355

23562356
f, (ax1, ax2) = plt.subplots(2)
2357-
cat.barplot(x=self.g, y=self.y, ci="sd", ax=ax1)
2358-
cat.barplot(x=self.g, y=self.y_perm, ci="sd", ax=ax2)
2357+
cat.barplot(x=self.g, y=self.y, errorbar="sd", ax=ax1)
2358+
cat.barplot(x=self.g, y=self.y_perm, errorbar="sd", ax=ax2)
23592359
for l1, l2 in zip(ax1.lines, ax2.lines):
23602360
assert approx(l1.get_xydata()) == l2.get_xydata()
23612361
for p1, p2 in zip(ax1.patches, ax2.patches):
@@ -2366,9 +2366,9 @@ def test_unaligned_index(self):
23662366
f, (ax1, ax2) = plt.subplots(2)
23672367
hue_order = self.h.unique()
23682368
cat.barplot(x=self.g, y=self.y, hue=self.h,
2369-
hue_order=hue_order, ci="sd", ax=ax1)
2369+
hue_order=hue_order, errorbar="sd", ax=ax1)
23702370
cat.barplot(x=self.g, y=self.y_perm, hue=self.h,
2371-
hue_order=hue_order, ci="sd", ax=ax2)
2371+
hue_order=hue_order, errorbar="sd", ax=ax2)
23722372
for l1, l2 in zip(ax1.lines, ax2.lines):
23732373
assert approx(l1.get_xydata()) == l2.get_xydata()
23742374
for p1, p2 in zip(ax1.patches, ax2.patches):
@@ -2620,8 +2620,8 @@ def test_draw_missing_points(self):
26202620
def test_unaligned_index(self):
26212621

26222622
f, (ax1, ax2) = plt.subplots(2)
2623-
cat.pointplot(x=self.g, y=self.y, ci="sd", ax=ax1)
2624-
cat.pointplot(x=self.g, y=self.y_perm, ci="sd", ax=ax2)
2623+
cat.pointplot(x=self.g, y=self.y, errorbar="sd", ax=ax1)
2624+
cat.pointplot(x=self.g, y=self.y_perm, errorbar="sd", ax=ax2)
26252625
for l1, l2 in zip(ax1.lines, ax2.lines):
26262626
assert approx(l1.get_xydata()) == l2.get_xydata()
26272627
for p1, p2 in zip(ax1.collections, ax2.collections):
@@ -2630,9 +2630,9 @@ def test_unaligned_index(self):
26302630
f, (ax1, ax2) = plt.subplots(2)
26312631
hue_order = self.h.unique()
26322632
cat.pointplot(x=self.g, y=self.y, hue=self.h,
2633-
hue_order=hue_order, ci="sd", ax=ax1)
2633+
hue_order=hue_order, errorbar="sd", ax=ax1)
26342634
cat.pointplot(x=self.g, y=self.y_perm, hue=self.h,
2635-
hue_order=hue_order, ci="sd", ax=ax2)
2635+
hue_order=hue_order, errorbar="sd", ax=ax2)
26362636
for l1, l2 in zip(ax1.lines, ax2.lines):
26372637
assert approx(l1.get_xydata()) == l2.get_xydata()
26382638
for p1, p2 in zip(ax1.collections, ax2.collections):
@@ -2882,9 +2882,9 @@ def test_plot_colors(self):
28822882
assert p1.get_facecolor() == p2.get_facecolor()
28832883
plt.close("all")
28842884

2885-
ax = cat.barplot(x="g", y="y", data=self.df, palette="Set2")
2885+
ax = cat.barplot(x="g", y="y", data=self.df, palette="Set2", hue="h")
28862886
g = cat.catplot(x="g", y="y", data=self.df,
2887-
kind="bar", palette="Set2")
2887+
kind="bar", palette="Set2", hue="h")
28882888
for p1, p2 in zip(ax.patches, g.ax.patches):
28892889
assert p1.get_facecolor() == p2.get_facecolor()
28902890
plt.close("all")
@@ -2901,8 +2901,8 @@ def test_plot_colors(self):
29012901
assert l1.get_color() == l2.get_color()
29022902
plt.close("all")
29032903

2904-
ax = cat.pointplot(x="g", y="y", data=self.df, palette="Set2")
2905-
g = cat.catplot(x="g", y="y", data=self.df, palette="Set2")
2904+
ax = cat.pointplot(x="g", y="y", data=self.df, palette="Set2", hue="h")
2905+
g = cat.catplot(x="g", y="y", data=self.df, palette="Set2", hue="h")
29062906
for l1, l2 in zip(ax.lines, g.ax.lines):
29072907
assert l1.get_color() == l2.get_color()
29082908
plt.close("all")

0 commit comments

Comments
 (0)