Can you please help me edit the index in my plots? I'm trying to rotate the names in the plot below so that it's a bit more readable.
Is there a way to prevent the "\n" from showing in the table?
Is there a way to label the y-axis?
In:
index = ("Plea \n Bargain \n Felony","Plea \n Bargain \n Misdemeanor")
df2 = pd.DataFrame({
'incarceration': pd.Series((23.7,1.99), index),
'probation': pd.Series((45.0,45.9), index),
'work': pd.Series((2.4,0.3), index),
'program': pd.Series((12,0), index)
})
print df2.head()
df2.plot(kind='bar', stacked=True)
Out
incarceration probation program work
Plea \n Bargain \n Felony 23.70 45.0 12 2.4
Plea \n Bargain \n Misdemeanor 1.99 45.9 0 0.3
[2 rows x 4 columns]

