aboutsummaryrefslogtreecommitdiff
path: root/qolab/data/trace.py
diff options
context:
space:
mode:
Diffstat (limited to 'qolab/data/trace.py')
-rw-r--r--qolab/data/trace.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/qolab/data/trace.py b/qolab/data/trace.py
new file mode 100644
index 0000000..9b14264
--- /dev/null
+++ b/qolab/data/trace.py
@@ -0,0 +1,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()
+