我在试着给对方展示两幅图。派焦和棒焦。我的代码是:
import matplotlib.pyplot as plt
fig , ax = plt.subplots(nrows = 1, ncols = 2)
df['column'].value_counts().plot.pie()
df['column'].value_counts().plot.bar()
plt.show() 这是输出:

有人能帮帮我吗?
发布于 2021-05-13 13:17:03
将子图传递给绘图命令:
fig , ax = plt.subplots(nrows = 1, ncols = 2)
df['column'].value_counts().plot.pie(ax=ax[0])
df['column'].value_counts().plot.bar(ax=ax[1])
plt.show() https://stackoverflow.com/questions/67519906
复制相似问题