def plot_that_lut(lutfiles, plot_type=None, count=None, inverse=False,
                  prelutfile=None, postlutfile=None, display_markers=False):
    """Plot a lut depending on its type and/or args

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

    kwargs:
        plot_type (str): possible values are 'curve' or 'cube'

        count: possible values are curve size or curve samples count or 'auto'

        prelutfile (str): path to a pre LUT

        postlutfile (str): path to a post LUT

        display_markers (bool): should display markers on curve

    Raises:
        PlotThatLutException
        Exception from OpenColorIO binding

    """
    if not isinstance(lutfiles, list):
        lutfiles = [lutfiles]
    mplh.set_matplotlib_backend()
    processors = []
    for lutfile in lutfiles:
        # check if LUT format is supported
        fileext = os.path.splitext(lutfile)[1]
        if not fileext:
            raise PlotThatLutException((
                "Error: Couldn't extract extension in this\n"
                "path : {0}"
            ).format(lutfile))
        if fileext not in OCIO_LUTS_FORMATS:
            raise PlotThatLutException("Error: {0} file aren't supported.\n{1}"
                                       .format(fileext, supported_formats()))
        # create OCIO processor
        processors.append(create_ocio_processor(lutfile, INTERP_LINEAR,
                                                inverse, prelutfile,
                                                postlutfile))
    # init args
    if not plot_type or plot_type == 'auto':
        # deduce plot type considering first lutfile
        if is_3d_lut(processors[0], lutfiles[0]):
            plot_type = 'cube'
        else:
            plot_type = 'curve'
    if not count or count == 'auto':
        # set plot_type from the command line and init default count
        if 'curve' in plot_type:
            count = DEFAULT_SAMPLE
        else:
            count = DEFAULT_CUBE_SIZE
    # plot
    print "Plotting a {0} with {1} samples...".format(plot_type, count)
    if 'curve' in plot_type:
        draw_red_curve = True
        draw_green_curve = True
        draw_blue_curve = True
        if 'red' in plot_type:
            # red_curve option
            draw_green_curve = False
            draw_blue_curve = False
        elif 'green' in plot_type:
            # green_curve option
            draw_red_curve = False
            draw_blue_curve = False
        elif 'blue' in plot_type:
            # blue_curve option
            draw_red_curve = False
            draw_green_curve = False
        return plot_curve(lutfiles, count, processors,
                          draw_red_curve=draw_red_curve,
                          draw_green_curve=draw_green_curve,
                          draw_blue_curve=draw_blue_curve,
                          display_markers=display_markers)
    elif plot_type == 'cube':
        # TODO support multiple cubes display
        return plot_cube(lutfiles[0], count, processors[0])
    else:
        raise PlotThatLutException((
            "Unknown plot type : {0}\n"
            "Plot type should be curve or cube.\n"
        ).format(plot_type))
dataset/ETHPy150Open mikrosimage/ColorPipe-tools/plotThatLut/plot_that_lut.py/plot_that_lut/original