Python 无法在plot()函数中使用pandas获取图形中的标签
我尝试使用pandas中的plot函数绘制图形:Python 无法在plot()函数中使用pandas获取图形中的标签,python,pandas,plot,Python,Pandas,Plot,我尝试使用pandas中的plot函数绘制图形: fd.plot(x= 'values', y='locations', title='Evoqua', kind='hist', figsize=(6,6)) 但无法获取x轴和y轴上的标签?DataFrame.plot方法返回matplotlib.axes.AxesSubplot对象,因此您可以像在matplotlib中一样向其添加标签: ax = fd.plot(x='values', y='locations', title='Evoqua
fd.plot(x= 'values', y='locations', title='Evoqua', kind='hist', figsize=(6,6))
但无法获取x轴和y轴上的标签?DataFrame.plot方法返回matplotlib.axes.AxesSubplot对象,因此您可以像在matplotlib中一样向其添加标签:
ax = fd.plot(x='values', y='locations', title='Evoqua', kind='hist', figsize=(6, 6))
ax.set_xlabel("x label")
ax.set_ylabel("y label")