2016-02-13 135 views
1

我有以下gnuplot的腳本:Gnuplot腳本輸出eps或svg - 如何編寫?

set autoscale 
unset log 
unset label 
set xtic auto 
set ytic auto 
unset title 
set xlabel "Number of clusters" 
set ylabel "Accuracy of classifier (%)" 
plot "cluster.dat" using 1:3 title "PART" with lines, \ 
    "cluster.dat" using 1:4 title "JRip" with lines, \ 
    "cluster.dat" using 1:5 title "FURIA" with lines 

我想這個腳本在運行時,輸出SVG或EPS - 將我需要什麼,添加或修改來實現這一目標?

回答

4

gnuplot輸出類型被稱爲terminal

在腳本中,前plot命令使用

set term svg 
set output "output.svg" 

set term eps 
set output "output.eps" 

兩個終端有幾種選擇。鍵入help eps(在某些gnuplot上,這是help epscairo)或help svg

要獲取您的版本的可用終端列表,請鍵入set terminal