gnuplot直方图上Y轴和条之间的空间
我有这样的gnuplot脚本:gnuplot直方图上Y轴和条之间的空间,gnuplot,histogram,Gnuplot,Histogram,我有这样的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 'ep
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:
通常,这种数据不需要使用柱状图,带有方框的打印样式也可以正常工作