BUG: bar plot can now handle bottom and left kw properly by sinhrks · Pull Request #7226 · pandas-dev/pandas (original) (raw)

Actually not a bug, but allows bar and barh plot to accept bottom and left kw respectively to specify the starting point.

import pandas as pd
import numpy as np
df = pd.DataFrame(np.random.randn(5, 5))
df.plot(kind='bar', bottom=1, ax=axes[0])
# TypeError: bar() got multiple values for keyword argument 'bottom'
import matplotlib.pyplot as plt
fig, axes = plt.subplots(1, 2)

df = pd.DataFrame(np.random.randn(5, 5))
df.plot(kind='bar', bottom=1, ax=axes[0])

df2 = pd.DataFrame(np.random.rand(5, 5))
df2.plot(kind='barh', left=[1, 2, 3, 4, 5], stacked=True, ax=axes[1])