Advertisement

# Python制作多种规格的子图(subplot)

阅读量:

python绘制不同规格的子图(subplot)

写在前面

在使用jupyter notebook进行编写时,若希望实现图片的独立展示,应当插入以下代码:%matplotlib qt

复制代码
    %matplotlib qt 
    fig = plt.figure()
    for file_csv in file:
       
    if 'csv' in file_csv and k <15: 
        k = k + 1 
        read_path = os.path.join(parentfolder,file_csv)
       
        for speed, volume in zip(Speed,Volume):
            density, volume_sum,SMS = get_K_V_Q(read_path,speed, volume) 
            
            ax1 = plt.subplot2grid((2,2),(0,0),colspan = 1)
            ax1.scatter(density,volume_sum,c = 'b') 
            ax1.set_ylabel('flow(veh/hour)')

全部评论 (0)

还没有任何评论哟~