Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/315.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何在matplotlib pyplot中显示过度计数序列?_Python_Matplotlib_Plot_Data Visualization - Fatal编程技术网

Python 如何在matplotlib pyplot中显示过度计数序列?

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,

我的代码

这里是显示超过计数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, 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()