def plot_curve(lutfiles, samples_count, processors, draw_red_curve=True,
               draw_green_curve=True, draw_blue_curve=True,
               display_markers=False):
    """Plot a lutfile as a curve

    Args:
        lutfiles ([str]): pathes to color transformation files (lut, matrix...)

        samples_count (int): number of points for the displayed curve

        processors ([PyOpenColorIO.config.Processor]): OpenColorIO processors
        for lutfiles

        draw_red_curve (bool): plot red curve only

        draw_green_curve (bool): plot green curve only

        draw_blue_curve (bool): plot blue curve only

        display_markers (bool): should display markers on curve

    Returns:
            str.

    """
    # matplotlib : general plot
    from matplotlib.pyplot import (title, plot, xlabel, ylabel, grid,
                                   figure)

    # init plot
    fig = figure()
    fig.canvas.set_window_title('Plot That 1D LUT')
    figure_title = ""
    for lutfile in lutfiles:
        filename = os.path.basename(lutfile)
        figure_title = "{0}\n{1}".format(figure_title, filename)
    title(figure_title)
    xlabel("Input")
    ylabel("Output")
    grid(True)
    markers_it = itertools.cycle(mplh.MARKERS)
    reds_it = itertools.cycle(mplh.REDS)
    greens_it = itertools.cycle(mplh.GREENS)
    blues_it = itertools.cycle(mplh.BLUES)
    for lutfile, processor in itertools.izip(lutfiles, processors):
        # init vars
        max_value = 1.0 - samples_count
        red_values = []
        green_values = []
        blue_values = []
        input_range = []
        # process color values
        for code_value in range(0, samples_count):
            norm_value = code_value / max_value
            res = processor.applyRGB([norm_value, norm_value, norm_value])
            red_values.append(res[0])
            green_values.append(res[1])
            blue_values.append(res[2])
            input_range.append(norm_value)
        # markers
        marker = markers_it.next()
        markersize = 0
        if display_markers:
            markersize = 4
        # plot curves
        labelbase = os.path.splitext(ntpath.basename(lutfile))[0]
        if draw_red_curve:
            if not draw_blue_curve and not draw_green_curve:
                label = labelbase
            else:
                label = "{0} (R)".format(labelbase)
            plot(input_range, red_values, color=reds_it.next(), marker=marker,
                 label=label, linewidth=1, markersize=markersize)
        if draw_green_curve:
            if not draw_blue_curve and not draw_red_curve:
                label = labelbase
            else:
                label = "{0} (G)".format(labelbase)
            plot(input_range, green_values, color=greens_it.next(),
                 marker=marker, label=label, linewidth=1,
                 markersize=markersize)
        if draw_blue_curve:
            if not draw_green_curve and not draw_red_curve:
                label = labelbase
            else:
                label = "{0} (B)".format(labelbase)
            plot(input_range, blue_values, color=blues_it.next(), marker=marker,
                 label=label, linewidth=1, markersize=markersize)
    matplotlib.pyplot.legend(loc=4)
    return show_plot(fig, filename)
dataset/ETHPy150Open mikrosimage/ColorPipe-tools/plotThatLut/plot_that_lut.py/plot_curve/swapped operands of `-`