def plot_triangle(x, y, color=None, draw_lines=True, lines_color='black',
                  fill=False, label=""):
    if fill:
        plt.fill(x, y, color='grey', alpha='0.5')
    if draw_lines:
        index_val = np.hstack([np.arange(x.size), 0])
        plt.plot(x[index_val], y[index_val], color=lines_color, label=label)

    if color:
        plt.plot(x[0], y[0], 'o', x[1], y[1], 'o', x[2], y[2], 'o',
                 color=color)
    else:
        plt.plot(x[0], y[0], 'or', x[1], y[1], 'og', x[2], y[2], 'ob')
Plot an rgb triangle in xy
dataset/ETHPy150Open mikrosimage/ColorPipe-tools/utils/matplotlib_helper.py/plot_triangle