0
シェルで実行されるスクリプトを作成して、gnuplotを使用して複数の行をグラフにプロットするディレクトリ内の複数のtxtファイルを使用しようとしました。したがって、1つの画像のコマンドを入力すると、結果は想像されるようになります。ここでは、コマンドを見ることができます:複数のグラフをgnuplotにプロットするスクリプト
plot "test2.txt" using 2:1 w filledcurves lc "red" title "Red Channel",
"text2.txt" using 3:1 w filledcurves lc "green" title "Green Channel",
"text2.txt" using 4:1 w filledcurves lc "blue" title "Blue Channel"
は今私のスクリプトは次のようになります。
[...] for i in 'ls -1 *.txt'
do
cat $1|
tr ":()" " " |
gnuplot -p -e 'set terminal jpeg; set output "'$1'.jpeg";plot "/dev/stdin" using 2:1 w filledcurves lc "red" title "Red Channel", "/dev/stdin" using 3:1 w filledcurves lc "green" title "Green Channel", "/dev/stdin" using 4:1 w filledcurves lc "blue" title "Blue Channel"'
done
スクリプトは、すべてのtxtファイルを編集し、JPGが作成されますが、最初のグラフ、「赤チャンネルで"私はまた別の行の間に, \
のような分離を交互に試みましたが、うまくいきませんでした。また、 "/ dev/stdin"の代わりに''
を使用しようとしましたが、何も起こりません。
あなたが元々持っていたように引用符。 –