【发布时间】:2017-04-12 11:45:41
【问题描述】:
我正在使用 Gnuplot 创建带有绘图线的直方图,但是,绘图线与条形头不太吻合,我也想将线放在离条形头稍远的地方。
set border 3
set boxwidth 0.9
set tics nomirror out scale 0.75
set style fill solid 0.8
plot "03.txt" using 2:xtic(1) lt rgb "#0060ad" notitle, "" using 2 smooth csplines notitle with lines ls 1, "" using 3 lt rgb "#ff6600" notitle, "" using 3 smooth csplines notitle with lines ls 2, "" using 4 lt rgb "#dd181f" notitle, "" using 4 smooth csplines notitle with lines ls 3
更新:
这是数据文件:
500000 25.938 25.938 2
1000000 52.385 52.385 4
1500000 79.749 78.405 6.125
2000000 152.589 100.261 12.479
2500000 224.869 118.364 19.159
【问题讨论】:
-
最好发布您的数据文件(或其中的重要部分)。我相信你会通过调整样条曲线的
using子句来实现你想要的,但是你的第2列的内容可能会对一个简单的选择产生一些影响。 “把线放在离杆头稍微远一点”的意思是整个样条线的垂直移动吗? -
@Joce 我添加了数据文件,是的,我需要垂直移动以避免将绘图线与条形头粘在一起。
标签: gnuplot