当前位置:   article > 正文

pycharm实现折线图_pycharm折线图

pycharm折线图
  1. import numpy as np
  2. from matplotlib import pyplot as plt
  3. import pylab as pl
  4. x1 = [30.89, 17.24, 13.82, 13.00, 12.47] # Make x, y arrays for each graph
  5. y1 = [47.769, 46.055, 44.176, 41.844, 39.476]
  6. x2 = [29.21, 16.76, 13.70, 13.02, 12.21]
  7. y2 = [47.761, 46.02, 44.096, 41.744, 39.359]
  8. pl.plot(x1, y1, 'r', label='original') # use pylab to plot x and y : Give your plots names
  9. pl.plot(x2, y2, 'g', label='optimization')
  10. pl.title('P-T') # give plot a title
  11. pl.xlabel('TIME') # make axis labels
  12. pl.ylabel('G_PSNR')
  13. pl.xlim(10.0, 35.0) # set axis limits
  14. pl.ylim(35.0, 50.0)
  15. pl.legend()
  16. pl.show() # show the plot on the screen

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/500344
推荐阅读
相关标签
  

闽ICP备14008679号