Ich habe DatenFehler matplotlib
city inc pop edu crime cult
New-York 29343,00 8683,00 0,00 10,40 0,00
Moscow 25896,00 17496,00 0,00 10,20 1,0
Rome 21785,00 15063,00 0,00 14,20 1,00
London 20000,00 70453,00 1,00 18,00 1,00
Berlin 44057,00 57398,00 1,00 6,30 1,00
Ich versuche Grundstück zu bauen und den Namen plot
geben und Farbe zu Spalten ändern
desire_salary = (df[(df['inc'] >= int(salary_people))])
fig = plt.figure()
result = desire_salary.pivot_table('city', 'cult', aggfunc='count').plot(kind='bar', alpha=0.75, rot=0, label="Presence/Absence of cultural centre")
plt.xlabel("Cultural centre")
plt.ylabel("Frequency")
plt.set_title('Salary and culture')
plt.plot(result[[0]], color='red')
plt.plot(result[[1]], color='blue')
plt.show()
Aber es gibt Fehler AttributeError: 'module' object has no attribute 'set_title'
und TypeError: 'AxesSubplot' object has no attribute '__getitem__'
schreiben 'plt.title ("Einige Titel")' – Serenity