我有这样的 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
这是我的输出:
我看到我的图表在 Y 轴和第一个条形之间有很长的空间。如何才能将条形均匀分布?
gnuplot
数据文件中的第一行应该是标题,这会让您感到困惑。只需跳过这一行every ::1
并且自动缩放很好:
plot 'dat/!component' using 2:xtic(1) every ::1 t "Count" lc rgbcolor "blue" lt 1
4.6.4 的结果:
一般来说,这种数据不需要使用直方图,绘图风格with boxes
也工作正常。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)