Matplotlib,从数据中创建间隔

时间:2018-04-19 14:52:47

标签: python pandas matplotlib

以下是我的数据集的截图。 enter image description here

我正在绘制,沿着x轴的文本长度(从1到1000不等),以及沿y轴的sum(有用),sum(有趣)和sum(cool)。

我使用下面的命令绘制:

df.plot(x="length(text)", y=["sum(useful)", "sum(funny)", "sum(cool)"], kind="bar",figsize=None)

以下是我的情节截图: enter image description here

现在,我想以间隔而不是图中的连续值来制作我的x轴,以使其更加明显。如何在matplotlib中实现这个目标?

0 个答案:

没有答案
相关问题