Dataframe 错误的x记号标签matplotlib
我得到了一份工作 我想使用以下命令从dataframe绘制条形图Dataframe 错误的x记号标签matplotlib,dataframe,matplotlib,Dataframe,Matplotlib,我得到了一份工作 我想使用以下命令从dataframe绘制条形图 ax0 = df_peakeffi.plot(kind='bar', width=0.8, figsize=(10, 4), hatch='/', edgecolor='black') ax0.xaxis.set_tick_params(rotation=0) 但是,它给出了错误的x记号标签() 如何修复它?尝试: ax0 = df_peakeffi.transpose().plot(kind='bar', wid
ax0 = df_peakeffi.plot(kind='bar', width=0.8, figsize=(10, 4), hatch='/', edgecolor='black')
ax0.xaxis.set_tick_params(rotation=0)
但是,它给出了错误的x记号标签()
如何修复它?尝试:
ax0 = df_peakeffi.transpose().plot(kind='bar',
width=0.8, figsize=(10, 4), hatch='/', edgecolor='black')
默认情况下,pandas
plot.bar
函数将数据帧索引作为绘图的x轴。请检查该表以获得正确的解释