Advertisement

matplotlib用来绘制直线

阅读量:

具体表现如下:

在这里插入图片描述
复制代码
    import matplotlib
    # matplotlib.use('TkAgg')
    import matplotlib.pyplot as plt
    
    
    import seaborn as sns
    %matplotlib inline
    
    sns.set()
    
    x = range(0,200)
    y = range(20,220)
    
    
    
    plt.figure(figsize=(6.5, 5.4))
    tick = list(range(0,200))
    
    
    #设置坐标轴名称
    plt.xlabel('AA')
    plt.ylabel('BB')
    #设置坐标轴刻度
    
    #画曲线
    
    
    l1 = plt.plot(range(len(tick)),x,linestyle='-',color ='salmon',label='CC')
    l2

全部评论 (0)

还没有任何评论哟~