Python 如何在matplotlib pyplot中显示过度计数序列?
我的代码 这里是显示超过计数2.5,5,7.5。。。 但我想看到超过1,2,3,4,5。。。。。 那么,我该怎么做呢 您需要添加: 你的答案是什么Python 如何在matplotlib pyplot中显示过度计数序列?,python,matplotlib,plot,data-visualization,Python,Matplotlib,Plot,Data Visualization,我的代码 这里是显示超过计数2.5,5,7.5。。。 但我想看到超过1,2,3,4,5。。。。。 那么,我该怎么做呢 您需要添加: 你的答案是什么 over = list(range(1,21)) bangladesh = [10, 12, 15, 19, 22, 33, 40, 54, 67, 77, 89, 102, 120, 135, 155, 170, 195, 209, 220, 235] india = [1, 6, 10, 19, 22, 31, 32, 34, 47, 54,
over = list(range(1,21))
bangladesh = [10, 12, 15, 19, 22, 33, 40, 54, 67, 77, 89, 102, 120, 135, 155, 170, 195, 209, 220, 235]
india = [1, 6, 10, 19, 22, 31, 32, 34, 47, 54, 67, 79, 100, 125, 135, 140, 145, 157, 168, 175]
plt.plot(over, bangladesh, label='Bangladesh')
plt.plot(over, india, label='India')
plt.title('Run Overflow')
plt.xlabel('Over')
plt.ylabel('Run')
plt.legend(loc='best')
plt.show()
over = list(range(1,21))
bangladesh = [10, 12, 15, 19, 22, 33, 40, 54, 67, 77, 89, 102, 120, 135, 155, 170, 195, 209, 220, 235]
india = [1, 6, 10, 19, 22, 31, 32, 34, 47, 54, 67, 79, 100, 125, 135, 140, 145, 157, 168, 175]
plt.plot(over, bangladesh, label='Bangladesh')
plt.plot(over, india, label='India')
plt.title('Run Overflow')
plt.xlabel('Over')
plt.ylabel('Run')
plt.xticks(range(1,21))
plt.legend(loc='best')
plt.show()