2017-03-02 52 views
0

我使用Gnuplot的2,2多槽环境。Gnuplot yerrorlines xtics问题

我的一个数据集是这样的:

# Avg1. Min1. Max1. Avg2. Min2. Max2. 
25 0.049 0.002 0.108 0.051 0.004 0.102 
50 0.034 0.005 0.070 0.036 0.004 0.086 
100 0.028 0.012 0.044 0.026 0.012 0.054 

而且我使用下面的脚本绘制第一张图(我想,一旦我得到我可以重复刚才的代码中的第一个右):

#!/usr/bin/env gnuplot 

set term post eps color solid enh 
set multiplot layout 2,2 rowsfirst 
set grid ytics 
set offsets 0.5, 0.5 
unset key 
set ylabel offset 1,0 
set xtics ("25" 1, "50" 2, "100" 3) 

### First plot 
set tmargin at screen 0.95 
set bmargin at screen 0.65 
set lmargin at screen 0.10 
set rmargin at screen 0.45 
set ylabel 'Y-Label Here' 
plot 'data.dat' u :2:3:4 w yerrorlines ti 'Title1', \ 
    '' u :5:6:7 w yerrorlines ti 'Title2' 

### three other graphs 

unset multiplot 

而且我有三个这样的情节。问题是我的X轴只显示25和50(如下所示)。 我不知道如何解决这个问题。任何人都可以帮忙吗? 我试过用1:2:3:4代替,但它显示了中间的X-tics,我不想展示。

PlotExample

回答

1

如果不指定x值显式列,那么gnuplot的使用行索引,它开始于零:

set xtics ("25" 0, "50" 1, "100" 2) 
plot 'data.dat' u 0:2:3:4 w yerrorlines ti 'Title1' 

您也可以直接使用的值在第一列作为xticlabels:

plot 'data.dat' u :2:3:4:xtic(1) w yerrorlines ti 'Title1' 
+0

它工作。谢谢 – Thiago

+0

太好了。然后,请接受答案来证明这一点 – Christoph