|
From: Bennett, S. \(GE Infrastructure\) <Sil...@ge...> - 2005-12-23 21:20:23
|
>-----Original Message-----
>From: Marek W. Gutowski [mailto:gu...@if...]
>Sent: Friday, December 23, 2005 2:51 AM
>To: Bennett, Silas (GE Infrastructure)
>Subject: Re: [Gnuplot-info] Plotting multiple columns from stdin
>
>
>Dear Silas,
>
>The first problem is easy to understand: the "file" stdin
>is special in that sense that it only "goes forward". You
>cannot "rewind" it. But let's leave it.
Ok, so I gather that gnuplot plots the requested lines sequentially =
instead of simultaneously. So the limitation is inherent in the current =
implementation.
>Are you sure that anybody is able to track the displayed
>curves when they're changing so quickly? Certainly not
>and a lot of displayed info is going to pass unattended.
Actually yes. 1000 data points at 125Hz sampling rate is an 8 second =
time series window. I would like a nice smooth refresh of the display so =
you can see the signals move across the screen. Ideally I would like to =
replot at 50Hz, but I could live with a refresh rate of 4Hz and even =
that would require gnuplot to replot after approximately 31 data points.
>Maybe the plot option "every" (--> help every) would be
>of some help, without sacrificing the performance?
That would kill the resolution though, I don't want to decimate the =
data.
>
>Marek Gutowski
Marek, Thank you for your insight into the "specialness" of the "-" =
file. It may be that I can't achieve what I need with gnuplot alone. =
Maybe I can whip something up in Python to drive gnuplot.
Cheers,
Silas Bennett
=3D0)
>
>
>Bennett, Silas (GE Infrastructure) wrote:
>> Hi All,
>>=20
>> I have observed some strange behavior with gnuplot recently. I am =
running Gnuplot version 4.0 >patchlevel 0 ( packaged in Debian / Etch ). =
I will demonstrate the problem I am having with a=20
>simplified case:
>>=20
>> #!/bin/bash
>>=20
>> {
>> echo 'plot "-" using 1:2 with lines, \'
>> echo '"" using 1:3 with lines'
>> echo '0 1 2'
>> echo '1 2 3'
>> echo '2 3 4'
>> echo '3 4 5'
>> echo '4 5 6'
>> echo '5 6 7'
>> echo 'e'
>> } | gnuplot -persist
>> ### End Bash Script
>>=20
>> This outputs the following message with no plot:=20
>>=20
>>=20
>>>gnuplot> plot "-" using 1:2 with lines, "" using 1:3 with lines
>>> =
^
>>> line 7: no data point found in specified file
>>=20
>>=20
>> Is this a feature or a bug? ;0)
>>=20
>> This next script demonstrates that the concept is right in that it =
generates the plot that you=20
>>would expect.
>>=20
>> #!/bin/bash
>>=20
>> {
>> echo 'plot "-" using 1:2 with lines'
>> echo '0 1 2'
>> echo '1 2 3'
>> echo '2 3 4'
>> echo '3 4 5'
>> echo '4 5 6'
>> echo '5 6 7'
>> echo 'e'
>> } | gnuplot -persist
>> ### End Bash Script
>>=20
>>=20
>> The plot I am asking for in the first script works if I read from a =
file instead of stdin:
>>=20
>> ### This is the contents of testdata.txt ###
>> 0 1 2
>> 1 2 3
>> 2 3 4
>> 3 4 5
>> 4 5 6
>> 5 6 7
>> ### End of testdata.txt ###
>>=20
>> #!/bin/bash
>> {
>> echo 'plot "testdata.txt" using 1:2 with lines, \'
>> echo '"" using 1:3 with lines'
>> } | gnuplot -persist
>> ### End Bash Script
>>=20
>> This script generates the appropriate plot.
>>=20
>>=20
>> Looking around on the net to try to find the solution to this problem =
I came across this link:
>> =
http://groups.google.com/group/comp.graphics.apps.gnuplot/browse_thread/t=
hread/593fd1647d96eb6b/06b84b965f06e4d7?q=3Dno+data+point+found+in+specif=
ied+file&rnum=3D3#06b84b965f06e4d7
>>=20
>> using the concept outlined there, the original script could be =
written as such:
>>=20
>> #!/bin/bash
>>=20
>> {
>> echo 'plot "-" using 1:2 with lines, \'
>> echo '"-" using 1:3 with lines'
>> echo '0 1 2'
>> echo '1 2 3'
>> echo '2 3 4'
>> echo '3 4 5'
>> echo '4 5 6'
>> echo '5 6 7'
>> echo 'e'
>> echo '0 1 2'
>> echo '1 2 3'
>> echo '2 3 4'
>> echo '3 4 5'
>> echo '4 5 6'
>> echo '5 6 7'
>> echo 'e'
>> } | gnuplot -persist
>> ### End Bash Script
>>=20
>> This works, but presents a bigger problem...
>>=20
>> Now moving away from the simple case, I need to plot 48 channels of =
floating point data from a=20
>>125Hz (as much as 4KHz) streaming source. I need to plot about 1000 =
data points per channel and=20
>>have the plot refresh as quickly as possible.
>>=20
>> I could store the data in a buffer and re-echo it to gnuplot 48 times =
but I take a huge=20
>>performance hit when I do. Similarly I could rewrite (overwrite) the =
data to a file and plot=20
>>the file, but that kills the performance as well.
>>=20
>> Any ( Suggestions / Help / Commiserations / RTFM's followed by a link =
to the M ) will be=20
>>appreciated.
>>=20
>> Cheers,
>> Silas Bennett
>>=20
>> =3D0)
>>=20
>> Silas L Bennett
>> GE Security
>> Scientist / Engineer
>>=20
>> T 858 605 5500 x 323
>> F 858 605 5501
>> sil...@ge...
>> www.gesecurity.com
>>=20
>> 15175 Innovation Dr.
>> San Diego, CA 92128
>> USA
>>=20
>>=20
>>=20
>> -------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc. Do you grep through =
log files
>> for problems? Stop! Download the new AJAX search engine that makes
>> searching your log files as easy as surfing the web. DOWNLOAD =
SPLUNK!
>> http://ads.osdn.com/?ad_idv37&alloc_id=16865&op=CCk
>> _______________________________________________
>> Gnuplot-info mailing list
>> Gnu...@li...
>> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>>=20
>
>
>--=20
>Marek Gutowski, gu...@if...
>Institute of Physics, ON-3.2, Al. Lotnikow 32/46,
>(PL) 02-668 Warszawa, POLAND, tel. +48-22-8436601 ext. 3122
> >> To talk or not to talk? Yes, talk, plain ASCII please <<
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
|