2016-03-04 45 views
-5

如何在gnuplot中以矢量形式繪製該程序(fortran)?命令:Gnuplot矢量堡壘

調用execute_command_line(「gnuplot plotvel.txt」)似乎不起作用。什麼都沒有發生

什麼使用1:2:3:4是指?在「暗算‘FILE.DAT’用1:2:3:4與載體填充頭LW 3」

call execute_command_line("gnuplot plotvel.txt") 

回答

2

首先,你是在節目開始製作一個數據文件plotdata.txt,同時努力稍後繪製file.dat,以便Gnuplot找不到後者。固定在此之後,你可以將-persist選項,以防止在屏幕上的圖表作爲

call execute_command_line("gnuplot -persist plotvel.txt") 

否則圖形立即消失,您無法看到圖片。另外,using 1:2:3:4表示您在數據文件中繪製第1,2,3列和第4列。對於vectors,前兩個代表每個矢量的起始點,後兩個代表要繪製的矢量。省略using 1:2:3:4也是可以的,因爲它是vectors的默認值。 (在下圖中,我刪除了xrangeyrange以繪製所有的載體。)enter image description here