Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #2021 > unrolled thread
| Started by | Dan Merschi <danmero@gmail.com> |
|---|---|
| First post | 2013-09-07 09:00 -0700 |
| Last post | 2013-09-07 17:17 -0700 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
Data manipulation (gnuplot) Dan Merschi <danmero@gmail.com> - 2013-09-07 09:00 -0700
Re: Data manipulation (gnuplot) Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2013-09-07 20:13 +0200
Re: Data manipulation (gnuplot) Dan Merschi <danmero@gmail.com> - 2013-09-07 17:17 -0700
| From | Dan Merschi <danmero@gmail.com> |
|---|---|
| Date | 2013-09-07 09:00 -0700 |
| Subject | Data manipulation (gnuplot) |
| Message-ID | <728e946b-3ae7-42e1-8a8a-753695fbdb97@googlegroups.com> |
Hi
I have a temperature log file like this:
tail -12 /logs/temp_20130906.log
28D942A603000062 1378503243 21.94
28F357A6030000B5 1378503245 46.06
284743A60300000D 1378503248 18.75
28D942A603000062 1378503364 21.88
28F357A6030000B5 1378503366 45.94
284743A60300000D 1378503368 18.75
28D942A603000062 1378503484 21.88
28F357A6030000B5 1378503486 45.62
284743A60300000D 1378503488 18.75
28D942A603000062 1378503604 21.88
28F357A6030000B5 1378503606 45.25
284743A60300000D 1378503608 18.75
As you can see the master pull the devices every 2 minutes at 2 seconds interval.
Right now I use awk collect only the records for the last 24 hours , split the log file into sensor file and plot the graph for each sensor as:
plot "284743A60300000D.log" using 2:3 title "Out" with lines lt 1 lw 1 lc rgb 'black'\
,"28D942A603000062.log" using 2:3 title "In" with lines lt 1 lw 1 lc rgb 'blue'\
,"28F357A6030000B5.log" using 2:3 title "Tank" with lines lt 1 lw 1 lc rgb 'red'
The question is can I plot directly from gnuplot without using external applications.
Right now I have only 3 sensors but as soon I will add more sensors and that will increase the processing time.
Regards,
Daniel
[toc] | [next] | [standalone]
| From | Hans-Bernhard Bröker <HBBroeker@t-online.de> |
|---|---|
| Date | 2013-09-07 20:13 +0200 |
| Message-ID | <b918meF2pu9U1@mid.dfncis.de> |
| In reply to | #2021 |
On 07.09.2013 18:00, Dan Merschi wrote: > As you can see the master pull the devices every 2 minutes at 2 seconds interval. > Right now I use awk collect only the records for the last 24 hours , split the log file into sensor file and plot the graph for each sensor as: > > plot "284743A60300000D.log" using 2:3 title "Out" with lines lt 1 lw 1 lc rgb 'black'\ > ,"28D942A603000062.log" using 2:3 title "In" with lines lt 1 lw 1 lc rgb 'blue'\ > ,"28F357A6030000B5.log" using 2:3 title "Tank" with lines lt 1 lw 1 lc rgb 'red' > > > The question is can I plot directly from gnuplot wit%Shout using external applications. That's going to prove trick, particularly the "reducse to the last 24 hours worth of data" job. Once you've solved that, you can probably do something like set ydata time set timefmt y "%s" splot "temp_last_24h.log" u 1:2:3:xticlabels(1) with lines for a quick overview. Individual sensors' data should be available via plot "temp_last_24h.log" u (stringcolumn(1) eq '28D942A603000062' ? $2 : NaN):3 w l
[toc] | [prev] | [next] | [standalone]
| From | Dan Merschi <danmero@gmail.com> |
|---|---|
| Date | 2013-09-07 17:17 -0700 |
| Message-ID | <635335bd-be9b-40be-bc04-e5e0d51b6b38@googlegroups.com> |
| In reply to | #2022 |
On Saturday, September 7, 2013 2:13:37 PM UTC-4, Hans-Bernhard Bröker wrote:
>
> That's going to prove trick, particularly the "reducse to the last 24
>
> hours worth of data" job. Once you've solved that, you can probably do
I set the following variable for 24 hours ago timestamps.
YesterdayS=$(/bin/date "+%s" --date="1 days ago")
Now I just need a gnuplot like query to compare the $YesterdayS value to second column. Something like that.
> splot "temp_last_24h.log" u 1:2:3:xticlabels(1) with lines
This is the error I got for the previous command
line 0: warning: Too many axis ticks requested (>7e+04)
>
> for a quick overview. Individual sensors' data should be available via
>
>
>
> plot "temp_last_24h.log" u (stringcolumn(1) eq '28D942A603000062' ?
>
> $2 : NaN):3 w l
I try your command but that take forever, no output.
Thanks Hans for your help.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web