【发布时间】:2023-04-04 02:25:01
【问题描述】:
我正在尝试设置我的情节标题以及 x 和 y 标签。总计都是 float64 的数字。 我正在尝试以尽可能简单的方式做到这一点。
这是我的代码的一部分:
plt.close('all')
cand_all =pd.DataFrame({'Bachmann':[total15],
'Romney':[total2],
'Obama':[total3],
'Roemer': [total4],
'Pawlenty':[total5],
'Johnson':[total6],
'Paul':[total7],
'Santorum':[total8],
'Cain':[total9],
'Gingrich':[total10],
'McCotter':[total12],
'Huntsman':[total13],
'Perry':[total14]})
cand_all.plot.bar()
【问题讨论】:
标签: python pandas matplotlib