|
|
@@ -1135,6 +1135,35 @@ def test_bar_barwidth_position(self): |
|
|
self._check_bar_alignment(df, kind='barh', subplots=True, width=0.9, position=0.2)
|
|
|
|
|
|
@slow
|
|
|
+ def test_bar_bottom_left(self):
|
|
|
+ df = DataFrame(rand(5, 5))
|
|
|
+ ax = df.plot(kind='bar', stacked=False, bottom=1)
|
|
|
+ result = [p.get_y() for p in ax.patches]
|
|
|
+ self.assertEqual(result, [1] * 25)
|
|
|
+
|
|
|
+ ax = df.plot(kind='bar', stacked=True, bottom=[-1, -2, -3, -4, -5])
|
|
|
+ result = [p.get_y() for p in ax.patches[:5]]
|
|
|
+ self.assertEqual(result, [-1, -2, -3, -4, -5])
|
|
|
+
|
|
|
+ ax = df.plot(kind='barh', stacked=False, left=np.array([1, 1, 1, 1, 1]))
|
|
|
+ result = [p.get_x() for p in ax.patches]
|
|
|
+ self.assertEqual(result, [1] * 25)
|
|
|
+
|
|
|
+ ax = df.plot(kind='barh', stacked=True, left=[1, 2, 3, 4, 5])
|
|
|
+ result = [p.get_x() for p in ax.patches[:5]]
|
|
|
+ self.assertEqual(result, [1, 2, 3, 4, 5])
|
|
|
+
|
|
|
+ axes = df.plot(kind='bar', subplots=True, bottom=-1)
|
|
|
+ for ax in axes:
|
|
|
+ result = [p.get_y() for p in ax.patches]
|
|
|
+ self.assertEqual(result, [-1] * 5)
|
|
|
+
|
|
|
+ axes = df.plot(kind='barh', subplots=True, left=np.array([1, 1, 1, 1, 1]))
|
|
|
+ for ax in axes:
|
|
|
+ result = [p.get_x() for p in ax.patches]
|
|
|
+ self.assertEqual(result, [1] * 5)
|
|
|
+
|
|
|
+ @slow
|
|
|
def test_plot_scatter(self):
|
|
|
df = DataFrame(randn(6, 4),
|
|
|
index=list(string.ascii_letters[:6]),
|
|
|
|
maybe put in enhancements