美文网首页
07_tf模块matplotlib的使用

07_tf模块matplotlib的使用

作者: 犬夜叉写作业 | 来源:发表于2019-07-12 21:50 被阅读0次
    import numpy as np
    import matplotlib.pyplot as plt
    x = np.array([1,2,3,4,5,6,7,8])
    y = np.array([3,5,7,6,2,6,10,15])
    plt.plot(x,y,'r')# 折线 1 x 2 y 3 color
    plt.plot(x,y,'g',lw=10)# 4 line w
    # 折线 饼状 柱状
    x = np.array([1,2,3,4,5,6,7,8])
    y = np.array([13,25,17,36,21,16,10,15])
    plt.bar(x,y,0.2,alpha=1,color='b')# (x,y,柱子肥胖,透明度,颜色)
    plt.show()
    
    image.png image.png image.png

    相关文章

      网友评论

          本文标题:07_tf模块matplotlib的使用

          本文链接:https://www.haomeiwen.com/subject/yxlukctx.html