2012-09-29 65 views
3

我有輸出管secuencegnuplot的:情節管輸出

command_a | command_b | ... | command_n 

輸出是一個時序的編號

4.2 
-1 
... 
0.2 

我可以用gnuplot的繪製這個數字? (將gnuplot添加到管道序列中)

回答

0

您可以在plot命令中使用' - '源。您只需要先傳輸命令文件,然後傳輸數據文件。例如:

test.gnuplot:

 
plot '-' with lines 

示例命令行:

 
[command generating data] | cat test.gnuplot - | gnuplot -persist 
+0

我得到這個失敗初始化wxWidgets。 (> 6) 第69行:警告:請求的軸標記太多(> 6) 第69行:警告:請求的軸標記太多(> 6) 第69行:警告:請求的軸標記太多 – JuanPablo

1

你嘗試用下面的?

plot "< command_a | command_b | ... | command_n"

具體的例子:

plot "< awk '{a[$1]++}END{for(i in a){print i,a[i]}}' datafile |sort -nk1"

它爲我(具有Linux系統的gnuplot 4.2和5.0測試)。