2013-10-10 49 views
1

我需要使用的Gnuplot繪製我的訓練集繪製,這是文件與我(xy座標):在錯誤的位置

0 0 
100 100 
150 200 

這裏是我的配置爲gnuplot的:

set terminal jpeg size picture_width,picture_height; 
set output filename_output; 
set lmargin 0 
set rmargin 0 
set tmargin 0 
set bmargin 0 
unset xtics; 
unset ytics; 
set multiplot 
plot 'spirala.jpg' binary filetype=jpg with rgbimage 
plot filename_input notitle lt rgb "#00FF00" 
unset multiplot 

這是怎麼了我運行 GNUPLOT

gnuplot\gnuplot.exe -e "filename_output='output\plot_training_set_0.jpg'; \ 
filename_input='output\plot_training_set_0.txt'; \ 
picture_width=200; picture_height=200;" plot.cfg 

這是我的結果(不幸),爲什麼在位置 [0,0],[100,100]和[150,200]上沒有標記? [133,100]只有一個標記是完全錯誤的。

Plotted training set

回答

1

你有兩個獨立的地塊,其覆蓋。因爲您沒有設置明確的xrangeyrange,所以每個圖都會自行縮放。只需使用一個單一的plot呼叫,而不multiplot模式,你的罰款:

set terminal jpeg size picture_width,picture_height 
set output filename_output 
set lmargin 0 
set rmargin 0 
set tmargin 0 
set bmargin 0 
unset tics 

plot 'spirala.jpg' binary filetype=jpg with rgbimage,\ 
    filename_input notitle lc rgb "green" 
+0

我只好也扭轉在y斧頭在左上角的[0,0]點。所以如果有人也需要它,請使用'set yrange [0:picture_height] reverse' – Buksy