2017-09-06 6 views
1

私は、異なるデバイスからのインターリーブデータ行を持つデータファイルを持っています。gnuplot:欠落/無効がinbetweenであっても接続点

今、私は1つのデバイスwith linepointsからデータをプロットし、興味のあるデバイスのみフィルタリングするために、これを使用したい:今

plot 'datafile' using (<someCondition> ? $1 : 1/0):2 

をいくつか無効なデータが常にあるので、gnuplotはポイントを接続しませんその間に

gnuplotでポイントを接続することはできますか?

ところで、これはWindowsマシンなので、外部のsed/awk/whateverコマンドはオプションではありません。

答えて

1

gnuplotのバージョンが無効なポイント不足しているものとして扱われ、with linesまたはwith linespointsは、単にそれらの点を無視する描画を持っているset datafile missing NaNを使用することができます5.0.6および5.0.6で他人

$data <<EOD 
12 
27 
0 
23 
42 
EOD 

set multiplot layout 1,2 

set title '0.0 invalid' 
plot $data using 0:($1 == 0.0 ? 1/0 : $1) with linespoints pt 7 notitle 

set title '0.0 invalid but treated as missing' 
set datafile missing NaN 
replot 
unset multiplot 

出力を接続しているので:

enter image description here

関連する問題