Graph 如何减少直方图gnuplot中的间隙?

Graph 如何减少直方图gnuplot中的间隙?,graph,gnuplot,histogram,Graph,Gnuplot,Histogram,gnuplot脚本: set auto x set yrange [0:100] set style data histogram set style histogram cluster gap 1 set style fill solid border -1 set boxwidth 1 plot 'test.data' using 1, '' u 2 测试数据 80 15 71 81 81 71 61 75 57 17 80 80 82 91 86

gnuplot脚本:

set auto x
set yrange [0:100] 
set style data histogram 
set style histogram cluster gap 1
set style fill solid border -1 
set boxwidth 1  
plot 'test.data' using 1, '' u 2
测试数据

80   15
71   81
81   71
61   75
57   17
80   80
82   91
86   73
输出:

我需要:


如何减少直方图gnuplot中的间距?

您正在查找
设置样式直方图
命令中的
间距
关键字

set style histogram clustered gap <width of gap>
设置样式直方图聚集间距

我认为使用聚集直方图样式无法做到这一点,因为
gap
选项只接受整数

对于只有两列的情况,可以使用
打印样式,将属于第一列的框向左移动框宽的一半,将第二列的框向右移动相同的量:

set auto x
set yrange [0:100] 
set style fill solid border -1
boxwidth=0.45

set boxwidth 0.45 absolute
set style data boxes
plot 'test.data' using ($0-boxwidth/2):1, '' u ($0+boxwidth/2):2
结果见4.6.4:


报告您可以在gnuplots中使用带有newhistogram的“at x-coord”选项手动调整集群之间的间距。我结合使用了这两种方法,设置样式直方图的“间隙”选项和“设置偏移”命令在图形上移动簇。希望这能有所帮助。

只是好奇——如果没有脚本,您从哪里获得相同数据的正确绘图?间隙选项只接受整数