def main():
    import argparse
    parser = argparse.ArgumentParser()
    parser.add_argument('logdir', nargs='*')
    parser.add_argument('--legend', nargs='*')
    parser.add_argument('--value', default='AverageReturn', nargs='*')
    args = parser.parse_args()
    use_legend = False
    if (args.legend is not None):
        assert (len(args.legend) == len(args.logdir)), 'Must give a legend title for each set of experiments.'
        use_legend = True
    data = []
    if use_legend:
        for (logdir, legend_title) in zip(args.logdir, args.legend):
            data += get_datasets(logdir, legend_title)
    else:
        for logdir in args.logdir:
            data += get_datasets(logdir)
    if isinstance(args.value, list):
        values = args.value
    else:
        values = [args.value]
    for value in values:
        plot_data(data, value=value)
def main():
    import argparse
    parser = argparse.ArgumentParser()
    parser.add_argument('logdir', nargs='*')
    parser.add_argument('--legend', nargs='*')
    parser.add_argument('--value', default='AverageReturn', nargs='*')
    args = parser.parse_args()
    use_legend = False
    if (args.legend is not None):
        assert (len(args.legend) == len(args.logdir)), 'Must give a legend title for each set of experiments.'
        use_legend = True
    data = []
    if use_legend:
        for (logdir, legend_title) in zip(args.logdir, args.legend):
            data += get_datasets(logdir, legend_title)
    else:
        for logdir in args.logdir:
            data += get_datasets(logdir)
    if isinstance(args.value, list):
        values = args.value
    else:
        values = [args.value]
    for value in values:
        plot_data(data, value=value)