def plot2D()

in visualize.py [0:0]


def plot2D(x,
           label_names=None,
           file_name=None,
           title_name=None,
           idx_zoom=None,
           show=False,
           d1=7,
           d2=7,
           fs=8,
           ms=4,
           col_palette=None):
    if col_palette is None:
        col_palette = colors_palette

    df = pd.DataFrame(dict(x=x[0], y=x[1], label=label_names))
    groups = df.groupby('label')

    fig = plt.figure(figsize=(d1, d2), dpi=300)
    plt.title(title_name, fontsize=fs)

    j = 0
    color_dict = {}
    for name, group in groups:
        marker = 'o'
        if name in set(['Ery', 'Mk', 'MEP']):
            marker = 'v'
        elif name == 'Lymph':
            marker = 's'
        plt.plot(group.x, group.y, marker=marker, markerfacecolor='none',
                 c=col_palette[j], linestyle='', ms=ms, label=name)
        color_dict[name] = col_palette[j]
        j += 1

    plt.legend(numpoints=1, loc='center left',
               bbox_to_anchor=(1, 0.5), fontsize=fs)

    if file_name:
        plt.savefig(file_name + '.png', format='png')

    if show:
        plt.show()

    plt.close(fig)