我需要画出两个数字的对照表,但我需要扩大两者的范围。在
第一个列表包含事件发生的时间(我正在模拟)。第二个包含累积频率。两者的一个例子是:
number_of_times = [77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 90]
cumsum = [0.01, 0.02, 0.03, 0.04, 0.09, 0.16, 0.3, 0.46, 0.74, 0.89, 0.95, 0.99, 1.0]
当x轴(number_of_times)的范围为0-100,但要确保累积频率仍然匹配,我该如何绘制这些曲线呢?在
目前我正在使用
^{pr2}$但这看起来不太好。在
您当前正试图根据列表
cumsum
绘制字典num
的键。只需向plot
方法提供两个列表作为参数,并使用xlim
设置x限制。在相关问题 更多 >
编程相关推荐