Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #4289 > unrolled thread

How do i pipe data to gnuplot/no-fifo and plot the data on the fly

Started byVeek M <veek@dont-use-this.com>
First post2020-02-16 02:18 +0000
Last post2020-02-18 14:42 +0000
Articles 3 — 2 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  How do i pipe data to gnuplot/no-fifo and plot the data on the fly Veek M <veek@dont-use-this.com> - 2020-02-16 02:18 +0000
    Re: How do i pipe data to gnuplot/no-fifo and plot the data on the fly Gavin Buxton <gavinbuxton@gmail.com> - 2020-02-16 05:59 -0800
    Re: How do i pipe data to gnuplot/no-fifo and plot the data on the fly Veek M <veek@dont-use-this.com> - 2020-02-18 14:42 +0000

#4289 — How do i pipe data to gnuplot/no-fifo and plot the data on the fly

FromVeek M <veek@dont-use-this.com>
Date2020-02-16 02:18 +0000
SubjectHow do i pipe data to gnuplot/no-fifo and plot the data on the fly
Message-ID<r2a8qe$mvp$1@dont-email.me>
my output is

42.0 27.8 29.8 43.0 42.0 43.0 
42.0 27.8 29.8 43.0 42.0 43.0

while true; do 
   sensors|egrep -o ' \+[0-9]{2}\.[0-9]+°C '|tr -d ' +°C'|tr -s '\n' ' ';
   echo; sleep 1; 
done|gnuplot -p -e '
  set xrange [0:60]; 
  set yrange [20:80]; 
  while (1) { 
    plot "-" using 1:2, "" using 1:3; pause 1; reread; 
  }'

just blocks. 
while true; do sensors|egrep -o ' \+[0-9]{2}\.[0-9]+°C '|tr -d ' +°C'|tr -
s '\n' ' '; echo; sleep 1; done|gnuplot -p -e 'plot "-" using 1:2, "" 
using 1:3'

So I tried
echo 20 40 60|gnuplot -p -e 'set xrange [0:60]; set yrange [20:80]; plot 
"-" using 1:2, "" using 1:3'
> line 1: warning: Skipping data file with no valid points

why is that?

[toc] | [next] | [standalone]


#4290

FromGavin Buxton <gavinbuxton@gmail.com>
Date2020-02-16 05:59 -0800
Message-ID<054358c2-8c1a-4a03-a5ee-5e5f88b7b8f8@googlegroups.com>
In reply to#4289
Sorry, tbh I'm not following. Usually I dump data to a file and pipe commands to gnuplot to plot the file. That's pretty easy to do, if that would help?

[toc] | [prev] | [next] | [standalone]


#4291

FromVeek M <veek@dont-use-this.com>
Date2020-02-18 14:42 +0000
Message-ID<r2gt49$erb$1@dont-email.me>
In reply to#4289
( seq 1 10 )|gnuplot -p -e 'set xrange [0:100]; set yrange [0:100]; 
while(1) { plot "<&3" using ($0):1 every ::::3:0; pause 10; replot; }' 3</
dev/stdin

Something like this works but only just.. basically you got to manually 
pipe the data using some gnuplot specific syntax not to mention the 
redirect to fd in bash
plot "<&3"

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web