1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
class Trace: def __init__(self, descrStr): self.descr = descrStr self.x = None self.xlabel = None self.xunit = None self.y = None self.ylabel = None self.yunit = None def plot(self): import matplotlib.pyplot as plt plt.plot(self.x, self.y, label=self.descr) plt.legend()