使用帶有圖像和多個箭頭的矩陣繪製資料文件

使用帶有圖像和多個箭頭的矩陣繪製資料文件

如何在同一圖形上繪製包含影像和一些水平線(無頭箭頭)的資料檔案矩陣?我已經嘗試過這段程式碼:

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

後面的數字set arrow標識用於以後更改的箭頭,並且必須是唯一的。您可以使用相同的標籤編號來用第二個箭頭覆蓋第一個箭頭。您可以簡單地省略它:

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

您的座標定義也是錯誤的。您必須只指定兩個值,而不是三個plot。且graph座標系通常只對0..1範圍有意義

相關內容