From: Bennett, S. \(GE Infrastructure\) <Sil...@ge...> - 2005-12-23 01:13:26
|
Hi All, 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 simplified case: #!/bin/bash { 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 This outputs the following message with no plot:=20 >gnuplot> plot "-" using 1:2 with lines, "" using 1:3 with lines > = ^ > line 7: no data point found in specified file Is this a feature or a bug? ;0) This next script demonstrates that the concept is right in that it = generates the plot that you would expect. #!/bin/bash { 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 The plot I am asking for in the first script works if I read from a file = instead of stdin: ### 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 ### #!/bin/bash { echo 'plot "testdata.txt" using 1:2 with lines, \' echo '"" using 1:3 with lines' } | gnuplot -persist ### End Bash Script This script generates the appropriate plot. 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 using the concept outlined there, the original script could be written = as such: #!/bin/bash { 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 This works, but presents a bigger problem... Now moving away from the simple case, I need to plot 48 channels of = floating point data from a 125Hz (as much as 4KHz) streaming source. I = need to plot about 1000 data points per channel and have the plot = refresh as quickly as possible. I could store the data in a buffer and re-echo it to gnuplot 48 times = but I take a huge performance hit when I do. Similarly I could rewrite = (overwrite) the data to a file and plot the file, but that kills the = performance as well. Any ( Suggestions / Help / Commiserations / RTFM's followed by a link to = the M ) will be appreciated. Cheers, Silas Bennett =3D0) Silas L Bennett GE Security Scientist / Engineer T 858 605 5500 x 323 F 858 605 5501 sil...@ge... www.gesecurity.com 15175 Innovation Dr. San Diego, CA 92128 USA |