I have the output a pipe secuence
command_a | command_b | ... | command_n
the output is a sequence a number
4.2
-1
...
0.2
I can use gnuplot to plot this numbers ? (added gnuplot to pipe sequence )
Did you try with the following?
plot "< command_a | command_b | ... | command_n"
concrete example:
plot "< awk '{a[$1]++}END{for(i in a){print i,a[i]}}' datafile |sort -nk1"
it works for me (tested with gnuplot 4.2 and 5.0 on a linux system).
You can use the '-' source in the plot command. You just need to pipe the command file first and then the data file. For example:
test.gnuplot:
plot '-' with lines
Example command line:
[command generating data] | cat test.gnuplot - | gnuplot -persist
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.