
画像といくつかの水平線(矢印なし)を含むデータ ファイル マトリックスを同じ図にプロットするにはどうすればよいですか? すでにこのコードを試しました:
set arrow 2 nohead from 0,50, graph 0 to 200,50, graph 1 front lc "black"
set arrow 2 nohead from 0,200, graph 1 to 200,200, graph 2 front lc "black"
plot 'data.txt' matrix w image
ただし、1 行のみが表示されます。
答え1
後ろの番号は、set arrow
後で変更する矢印を識別するもので、一意である必要があります。同じタグ番号を使用して、最初の矢印を 2 番目の矢印で上書きします。省略することもできます。
set arrow nohead from 0,50 to 200,50 front lc "black"
set arrow nohead from 0,200 to 200,200 front lc "black"
plot 'data.txt' matrix w image
座標の定義も間違っています。 には 3 つの値ではなく 2 つの値のみを指定する必要がありますplot
。また、graph
座標系は通常 0..1 の範囲でのみ意味を持ちます。