必修1-P26页code1

#-------------------------------------------------------------------------------
# Name:        module1
# Purpose:
#
# Author:      Administrator
#
# Created:     09-10-2020
# Copyright:   (c) Administrator 2020
# Licence:     
#-------------------------------------------------------------------------------

def main():
    import numpy as np
    import matplotlib.pyplot as plt

    x0 = [5,10,15,20,25,30,35,40,45,50]
    y0 = [586,291,198,143,101,98,72,68,59,55]

    plt.title("Test")
    plt.xlabel("R/O")
    plt.ylabel("I/am")
    plt.scatter(x0[:], y0[:], 5, "red", linewidth=3)
    plt.plot(x0,y0)
    plt.show()

if __name__ == '__main__':
    main()

测试输出:


搜狗截图20210302082508.jpg

你可能感兴趣的:(必修1-P26页code1)