import matplotlib #matplotlib.use('agg') import matplotlib.pyplot as plt import itertools marker = itertools.cycle((',', '+', '.', 'o', '*')) values = [] with open("a.csv") as f: head = f.readline() head = head.split(",")[1:-1] for line in f: tag = line.split(",") values.append([tag[0], list(map(float, tag[1:-1]))]) x = list(range(1, len(head) + 1)) plt.xticks(x, head) for legend, value in values: plt.plot(x[:len(value)], value, label = legend, marker = next(marker)) plt.yscale("log") plt.legend() plt.show() #plt.savefig("plt.png")