Gnuplot没有在所有抽搐标记上贴标签

时间:2014-06-24 09:23:22

标签: gnuplot

我正在做一个短数据文件的日志图:

22.5 4.5
15.5 7.4
12.2 9.6
8.0 12.5
7.1 14
5.7 16.4
4.4 18.2
3.8 20.8
3.2 23.5
1.2 28.3
0.2 38.4

到目前为止我使用的命令是:

plot "data.dat" using (($2)*0.01):(($1)*(10**(-5))):(0.005):(0.3*(10**(-5))) with xyerrorbars linestyle 7 title 'dados colhidos'
set logscale
set xrange [0.035:0.4]
set yrange [0.05*(10**(-5)):30*(10**(-5))]
set xtics 0.04,0.05,0.39
set ytics 0.1*(10**(-5)),5*(10**(-5)),30*(10**(-5))
set xtics nomirror
set ytics nomirror
set format x "%f"
set format y "%f"
replot

但是在图中只有第一个标记(x轴和y轴)标记为:

x轴为0.04,y轴为0.1 *(10 **( - 5))。

如果我有足够的声誉,我会发布一张我正在拍摄的情节照片......

我已经搜索了一些关于gnuplot和互联网的书籍,但我没有找到任何帮助。

我想要的是所有标记处的标签(数字)。你有什么想法吗?

感谢阅读!

我使用的是4.6版补丁级别。

1 个答案:

答案 0 :(得分:0)

对于对数图,set xticsset ytics指定的增量是乘数。此外,对于对数图,您不能使用任意tic标签,但标签必须与用于对数标度的基础相关。

考虑示例

set logscale
set xrange [0.035:0.4]
set yrange [0.05*(10**(-5)):30*(10**(-5))]
set tics format "%f"
unset key

plot "data.dat" using ($2 *0.01):($1*1e-5):(0.005):(0.3e-5) with xyerrorbars ls 7

结果

enter image description here

对于y轴,这看起来不错。对于x轴,您可能希望尝试使用不同的基准来进行日志刻度。但如果结果更好,你必须自己决定:

set logscale y
set logscale x 2
set mxtics 8
set xrange [0.035:0.4]
set yrange [0.05*(10**(-5)):30*(10**(-5))]
set tics nomirror format "%f"
unset key

plot "data.dat" using ($2 *0.01):($1*1e-5):(0.005):(0.3e-5) with xyerrorbars ls 7

enter image description here

相关问题