diff options
| author | Matthias Geier <Matthias.Geier@gmail.com> | 2017-02-04 13:31:52 +0100 |
|---|---|---|
| committer | Matthias Geier <Matthias.Geier@gmail.com> | 2017-02-04 13:31:52 +0100 |
| commit | d26c8008d2a52f54426a1bdd965cfac037dfd482 (patch) | |
| tree | c14f879357e4ce01c55e439a01e6c418f1636326 /examples | |
| parent | 5def00ade73156dfd2ec3da155262825494a644b (diff) | |
Simplify plot_input example
Diffstat (limited to 'examples')
| -rwxr-xr-x | examples/plot_input.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/plot_input.py b/examples/plot_input.py index 5a105f4..88eb99f 100755 --- a/examples/plot_input.py +++ b/examples/plot_input.py @@ -63,16 +63,14 @@ def update_plot(frame): """ global plotdata - block = True # The first read from the queue is blocking ... while True: try: - data = q.get(block=block) + data = q.get_nowait() except queue.Empty: break shift = len(data) plotdata = np.roll(plotdata, -shift, axis=0) plotdata[-shift:, :] = data - block = False # ... all further reads are non-blocking for column, line in enumerate(lines): line.set_ydata(plotdata[:, column]) return lines |
