matplotlib绘图简单示范

    技术2022-07-12  76

    import matplotlib import numpy from matplotlib import pyplot def drawLine(): x=numpy.arange(1,11) y1=2*x+5 pyplot.title("draw1") pyplot.xlabel("xxx") pyplot.ylabel("yyy") pyplot.plot(x, y1, "3") y2=x pyplot.plot(x,y2,"c") pyplot.show() if __name__ == '__main__': drawLine()

     

    Processed: 0.014, SQL: 10