2014-10-10 49 views
1

使用Gnuplot繪製蜘蛛(或圖表,極座標等)繪圖。代碼正常工作,但在輸出圖中,我得到一個重複的正x軸(看圖,你可以觀察到這條線較暗)以及標籤的重複。我該如何解決這個問題?使用Gnuplot在蜘蛛圖上繪製雙x軸

的代碼是這樣的:

#!/usr/bin/env gnuplot 
unset border 
set polar 
set angles degrees 
set term pngcairo enhanced size 800,800 
set output 'graph_eff_10_3_accuracy_spider.png' 
set xtics axis 
set ytics axis 
set grid polar 90 
set style line 10 lt 1 lc 0 lw 0.3 # line style for the grid 
set grid ls 10 
set xrange[-1.5:1.5] 
set yrange[-1.5:1.5] 
set size square 
set lmargin 12 
set rmargin 12 
set key font ',12' 
set title font ',20' 

set_label(x, text) = sprintf("set label '%s' at (1.8*cos(%f)), (1.7*sin(%f)) center", text, x, x) #this places a label on the outside 
eval set_label(0, "Answer 1") 
eval set_label(90, "Answer 2") 
eval set_label(180, "Answer 3") 
eval set_label(270, "Answer 4") 

set linetype 1 lc rgb 'blue' lw 2 pt 7 ps 2 # right, post 
set linetype 2 lc rgb 'red' lw 2 pt 7 ps 2 # wrong, post 

plot "answers_in_post.csv" using 1:2 title '(IN, R2)' with lp lt 1 

和輸出數字是這樣的: enter image description here

回答

1

即其在polar模式添加的raxis。只要做一個

unset raxis 
set rtics scale 0 format '' 

你應該沒問題。

+0

謝謝你的迴應。這隻適用於x軸,但問題仍然存在於標籤中...您有任何想法嗎? – 2014-10-10 11:42:58

+0

嗯,'unset rtics'也會刪除網格。 – 2014-10-10 11:53:09

+0

太棒了!謝謝Christoph! – 2014-10-10 12:09:36