aboutsummaryrefslogtreecommitdiff
path: root/qolab/data
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-02 13:10:51 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-02 13:10:51 -0500
commit4035e1dfd9cc16fc4eb730cb51adf6a5963269bf (patch)
treebee7c779950a1cb0defa431644d5a53063594bdf /qolab/data
parente30d8525409aa4d6554ff64485decc1be25d31c1 (diff)
downloadqolab-4035e1dfd9cc16fc4eb730cb51adf6a5963269bf.tar.gz
qolab-4035e1dfd9cc16fc4eb730cb51adf6a5963269bf.zip
create a root package qolab
Diffstat (limited to 'qolab/data')
-rw-r--r--qolab/data/__init__.py6
-rw-r--r--qolab/data/trace.py16
2 files changed, 22 insertions, 0 deletions
diff --git a/qolab/data/__init__.py b/qolab/data/__init__.py
new file mode 100644
index 0000000..528815a
--- /dev/null
+++ b/qolab/data/__init__.py
@@ -0,0 +1,6 @@
+
+from .trace import Trace
+
+__all__ = [
+ "Trace",
+]
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()
+