Closed
Description
Description
Proplot plots the legend for each label instead of listing labels on one legend.
As a result, several legends are stacked together.
Steps to reproduce
import proplot as plot
df = pd.DataFrame({'A' : ['foo', 'bar', 'foo', 'bar',
'foo', 'bar', 'foo', 'foo'],
'B' : ['one', 'one', 'two', 'three',
'two', 'two', 'one', 'three'],
'C' : np.random.randn(8),
'D' : np.random.randn(8)})
fig, axs = plot.subplots()
df.groupby('A')['C'].plot(legend=True, ax=axs)
Equivalent steps in matplotlib
import matplotlib.pyplot as plt
df = pd.DataFrame({'A' : ['foo', 'bar', 'foo', 'bar',
'foo', 'bar', 'foo', 'foo'],
'B' : ['one', 'one', 'two', 'three',
'two', 'two', 'one', 'three'],
'C' : np.random.randn(8),
'D' : np.random.randn(8)})
df.groupby('A')['C'].plot(legend=True)
plt.show()
Proplot version
0.6.3