gnuplot直方图中Y轴和条之间的间距

3
我有一个像这样的gnuplot脚本:
set term pos eps
set style data histogram
set style histogram clustered gap 1
set grid y
set boxwidth 0.8 absolute
set style fill transparent solid 0.8 noborder
#set key outside right top vertical Left

#component stuff
set output 'eps/component.eps'
set title "Component in interesting Issues"
set xlabel "Components"
set xtics nomirror rotate by -270
plot 'dat/!component' using 2:xtic(1) t "Count" lc rgbcolor "blue" lt 1

和数据:

Cmp count
AM    167
NM    90
RM    83
JT    53
TT    51
RED   32
MAP   29
COMM  3
SX    6
HS    68

这是我的输出: output 我发现我的图表中,Y轴和第一根柱状条之间有很长的空间。如何使柱状条均匀地分开?
1个回答

2

gnuplot 在处理数据文件时会受到第一行标题的干扰。使用 every ::1 跳过该行后,自动缩放就能正常工作:

plot 'dat/!component' using 2:xtic(1) every ::1 t "Count" lc rgbcolor "blue" lt 1

4.6.4版本的结果:

在此输入图片描述

通常情况下,您不需要使用直方图来处理这种类型的数据,使用绘图样式with boxes也可以很好地工作。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接