使用Gnuplot的蜘蛛图上的双x轴 [英] Double x-axis on a spider plot with Gnuplot

查看:147
本文介绍了使用Gnuplot的蜘蛛图上的双x轴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Gnuplot绘制蜘蛛图(或图表,极坐标等).代码可以正常工作,但是在输出图中,我得到了一个重复的正x轴(从图中可以看到,该行较暗),并且还有重复的标签.我该怎么解决?

I'm making a spider (or chart, polar, etc.) plot using Gnuplot. The code works properly, but in the output figure I get a duplicate positive x-axis (looking at the figure, you can observe that the line is darker) and also a duplication of labels. How can I solve that?

代码是这样的:

#!/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

输出图是这样的:

推荐答案

这是在polar模式下添加的raxis.只是做一个

That is the raxis which is added in polar mode. Just do a

unset raxis
set rtics scale 0 format ''

你应该没事.

这篇关于使用Gnuplot的蜘蛛图上的双x轴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆