Gnuplot:Box和wisker绘图-未定义变量:使用

Gnuplot:Box和wisker绘图-未定义变量:使用,gnuplot,boxplot,Gnuplot,Boxplot,我正在尝试用gnuplot创建一个框和胡须图,以输出到一个latex文档中。我一直有以下错误: “test.gp”,第10行:未定义变量:使用 我的代码如下: set terminal latex set output "test.tex" set style data boxplot set style fill solid 0.25 border -1 set style boxplot outliers pointtype 7 set datafile separator "," set

我正在尝试用gnuplot创建一个框和胡须图,以输出到一个latex文档中。我一直有以下错误:

“test.gp”,第10行:未定义变量:使用

我的代码如下:

set terminal latex
set output "test.tex"
set style data boxplot
set style fill solid 0.25 border -1
set style boxplot outliers pointtype 7

set datafile separator ","
set xrange[0:6] 
set yrange[0.000:1.000] 
plot "test.csv" using 1:3:2:6:5:xticlabels(7) with candlesticks notitle whiskerbars, using 1:4:4:4:4 with candlesticks lt -1 notitle
这是我正在使用的CSV文件:

1,0.381768,0.386109,0.423836,0.381768,0.42965,“0.3”, 2,0.400131,0.446271,0.47671,0.400131,0.481733,"0.4", 3,0.442295,0.443961,0.512071,0.442295,0.58654,"0.5", 4,0.464072,0.502773,0.516437,0.464072,0.589175,"0.6", 5,0.460358,0.468294,0.479633,0.460358,0.562291,“0.7”


有人能帮我找出绘图命令中的错误吗?如果您缺少第二个
'
,请尝试以下操作:

plot "test.csv" using 1:3:2:6:5:xticlabels(7) with candlesticks notitle whiskerbars, '' using 1:4:4:4:4 with candlesticks lt -1 notitle

顺便问一下,您是否有兴趣绘制
烛台图
箱线图
?有什么区别?我主要是按照我在网上找到的例子,他们使用烛台。好吧,用方框图你只需指定你的数据列和平均值,就可以计算出stdev。您还可以选择以不同的样式显示异常值。而对于烛台,您需要明确指定五点摘要,即最小值、25%ile、中值、75%ile和最大值。因此,如果您只是计划购买烛台,从您的数据中也可以看出,不需要
set style data boxplot
set style boxplot离群值pointtype 7
。也可以查看这些链接以获取示例:谢谢,希望在编写代码之前知道这一点,哈哈。