BUG: Area plot legend has incorrect color by sinhrks · Pull Request #8027 · pandas-dev/pandas (original) (raw)

Derived from #7636. Area plot sets incorrect alpha values to legend when stacked=True.

NG: Each areas are drawn with alpha=1.0, but legend has alpha=0.5

figure_ng

After fix

df = pd.DataFrame(np.random.rand(20, 5), columns=['A', 'B', 'C', 'D', 'E'])
df.plot(kind='area')

figure_1

# When alpha is specified
df.plot(kind='area', alpha=0.2)

figure_2