(lasts, paths=[])
return f
paths: list of path0~path2
paths: list of path0~path2
paths : list of path0~path2
def plot_path(lasts, paths=[]):
    '''
    paths: list of path0~path2
    '''
    assert len(paths) > 0
    path0 = paths[0]
    path1 = paths[1] if len(paths) > 1 else []
    path2 = paths[2] if len(paths) > 2 else []

    if path0[-1] != lasts[0]: path0.append(lasts[0])
    if len(path1) != 0 and path1[-1] != lasts[1]: path1.append(lasts[1])
    if len(path2) != 0 and path2[-1] != lasts[2]: path2.append(lasts[2])
    x_len = max(len(path0), len(path1), len(path2))
    f, ax = plt.subplots(figsize=(x_len, 3))
    ax.plot(np.arange(len(path0)), 2 - np.array(path0), label='1/32', lw=2.5, color='#000000', linestyle='-')#, marker='o', markeredgecolor='r', markerfacecolor='r')
    ax.plot(np.arange(len(path1)), 2 - np.array(path1) - 0.08, lw=1.8, label='1/16', color='#313131', linestyle='--')#, marker='^', markeredgecolor='b', markerfacecolor='b')
    ax.plot(np.arange(len(path2)), 2 - np.array(path2) - 0.16, lw=1.2, label='1/8', color='#5a5858', linestyle='-.')#, marker='s', markeredgecolor='m', markerfacecolor='m')
    plt.xticks(np.arange(x_len), list(range(1, x_len+1)))
    plt.yticks(np.array([0, 1, 2]), ["1/32", "1/16", "1/8"])
    plt.ylabel("Scale", fontsize=17)
    plt.xlabel("Layer", fontsize=17)
    for tick in ax.xaxis.get_major_ticks():
        tick.label.set_fontsize(14)
    for tick in ax.yaxis.get_major_ticks():
        tick.label.set_fontsize(14)
    f.tight_layout()
    plt.legend(prop={'size': 14}, loc=3)
    return f
def plot_path ( lasts , paths = [ ] ) : assert len ( paths ) > 0 path0 = paths [ 0 ] path1 = paths [ 1 ] if len ( paths ) > 1 else [ ] path2 = paths [ 2 ] if len ( paths ) > 2 else [ ] if path0 [ - 1 ] != lasts [ 0 ] : path0 . append ( lasts [ 0 ] ) if len ( path1 ) != 0 and path1 [ - 1 ] != lasts [ 1 ] : path1 . append ( lasts [ 1 ] ) if len ( path2 ) != 0 and path2 [ - 1 ] != lasts [ 2 ] : path2 . append ( lasts [ 2 ] ) x_len = max ( len ( path0 ) , len ( path1 ) , len ( path2 ) ) f , ax = plt . subplots ( figsize = ( x_len , 3 ) ) ax . plot ( np . arange ( len ( path0 ) ) , 2 - np . array ( path0 ) , label = '1/32' , lw = 2.5 , color = '#000000' , linestyle = '-' ) #, marker='o', markeredgecolor='r', markerfacecolor='r') ax . plot ( np . arange ( len ( path1 ) ) , 2 - np . array ( path1 ) - 0.08 , lw = 1.8 , label = '1/16' , color = '#313131' , linestyle = '--' ) #, marker='^', markeredgecolor='b', markerfacecolor='b') ax . plot ( np . arange ( len ( path2 ) ) , 2 - np . array ( path2 ) - 0.16 , lw = 1.2 , label = '1/8' , color = '#5a5858' , linestyle = '-.' ) #, marker='s', markeredgecolor='m', markerfacecolor='m') plt . xticks ( np . arange ( x_len ) , list ( range ( 1 , x_len + 1 ) ) ) plt . yticks ( np . array ( [ 0 , 1 , 2 ] ) , [ "1/32" , "1/16" , "1/8" ] ) plt . ylabel ( "Scale" , fontsize = 17 ) plt . xlabel ( "Layer" , fontsize = 17 ) for tick in ax . xaxis . get_major_ticks ( ) : tick . label . set_fontsize ( 14 ) for tick in ax . yaxis . get_major_ticks ( ) : tick . label . set_fontsize ( 14 ) f . tight_layout ( ) plt . legend ( prop = { 'size' : 14 } , loc = 3 ) return f