diff options
author | sara <sara.halter@gmx.ch> | 2021-12-14 18:57:40 +0100 |
---|---|---|
committer | sara <sara.halter@gmx.ch> | 2021-12-14 18:57:40 +0100 |
commit | cd9430c9da19fa21c71c2e076da487c78afe5673 (patch) | |
tree | c65a9b248f5d73bb76719fea4933e8edfbc8b554 /src/gui/net.py | |
parent | BER block angepasst (diff) | |
parent | Remove picture window and make size of plots a variable (diff) | |
download | Fading-cd9430c9da19fa21c71c2e076da487c78afe5673.tar.gz Fading-cd9430c9da19fa21c71c2e076da487c78afe5673.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/gui/net.py')
-rw-r--r-- | src/gui/net.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/net.py b/src/gui/net.py index 715e7a0..121cc76 100644 --- a/src/gui/net.py +++ b/src/gui/net.py @@ -59,7 +59,7 @@ class network_plot(udpsource): """ Wraps a udpsource while at the same time intefacing with DearPyGUI as a plot element. """ - def __init__(self, url, dtype, nsamples , **kwargs): + def __init__(self, url, dtype, nsamples, **kwargs): udpsource.__init__(self, url, dtype) self.nsamples = nsamples @@ -78,6 +78,14 @@ class network_plot(udpsource): self.yvalues.extend(np.zeros(self.nsamples)) def _init_dpg_plot(self, **kwargs): + if "tag" in kwargs: + self.tag = kwargs["tag"] + + self.series_tag = f"{self.tag}_series" + self.xaxis_tag = f"{self.tag}_xaxis" + self.yaxis_tag = f"{self.tag}_yaxis" + self.window_tag = f"window_{self.tag}" + self.plot = dpg.plot(**kwargs) # Map `with' expressions to the underlying plot |