From 5550379accd37b8e3d00492ad93a270f9d635cc7 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Fri, 7 Jan 2022 21:01:28 -0500 Subject: added repr for TraceSetSameX --- qolab/data/trace.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qolab/data/trace.py b/qolab/data/trace.py index e5dfa2d..de6334a 100644 --- a/qolab/data/trace.py +++ b/qolab/data/trace.py @@ -223,6 +223,14 @@ class TraceSetSameX(Trace): for k, tr in self.traces.items(): tr.clear_data() + def __repr__(self): + cls_name = f'{self.__class__.__name__}(' + xlabel= f"{self.x.config['label']}" + xparam= f"x: '{xlabel}'" + yparam = f"y: {list(self.traces.keys())}" + + return "".join([cls_name, xparam, ', ', yparam, f', N={self.x.values.size}', ')']) + def addTraceX(self, tr): self.x = tr -- cgit v1.2.3