小编Yus*_*ury的帖子

Python Matplotlib-设置X轴比例

我的这张图显示以下内容:

plt.plot(valueX, scoreList)
plt.xlabel("Score number") # Text for X-Axis
plt.ylabel("Score") # Text for Y-Axis
plt.title("Scores for the topic "+progressDisplay.topicName)
plt.show()
Run Code Online (Sandbox Code Playgroud)

valueX = [1,2,3,4],scoreList = [5,0,0,2]

无论'scoreList'中的值是多少,我都希望小数位增加1。目前,我的x轴以0.5而不是1s上升。

如何设置它使其仅在1中上升?

python tkinter matplotlib

5
推荐指数
3
解决办法
3万
查看次数

标签 统计

matplotlib ×1

python ×1

tkinter ×1