我会说这也取决于你想处理的一般输入。在该列D
始终包含的2每个簇连续功率的情况下,人们可能会倾向于与boxes
绘图样式手动构造的框:
set terminal pngcairo enhanced
set output 'fig.png'
#if your data file contains the header line with A, B, C, D, E
set key autotitle columnhead
set boxwidth 0.5
set style fill solid
f=6
w=0.5
unset key
set style fill empty
unset xtics
set ytics out nomirror
set format y '%.2f'
set label at graph 0,1 "{/Symbol \264}10^{3}" offset character 0.75,-1
plot \
'data.dat' u ($1*f*w + log($4)/log(2)*w):($5/1e-3) w boxes lc rgb 'dark-red', \
'' u ($1*f*w + log($4)/log(2)*w):(0):4 w labels offset 0, char 1
这里,变量w
指定与一个基本的期望框。每个方框的位置计算为整个集群的偏移量$1*f*w
加上特定方框log($4)/log(2)*w
的偏移量。如果栏D
包含数字1,2,4,8等,则log($4)/log(2)
给出该框在对应群集内的“位置”。结果是:
或者,另一个假设可能是每个簇具有相同数量的框G
。然后脚本可能看起来像:
set terminal pngcairo enhanced
set output 'fig.png'
#if your data file contains the header line with A, B, C, D, E
set key autotitle columnhead
set boxwidth 0.5
set style fill solid
f=6
w=0.5
G=4
unset key
set style fill empty
unset xtics
set ytics out nomirror
set format y '%.2f'
set label at graph 0,1 "{/Symbol \264}10^{3}" offset character 0.75,-1
plot \
'data.dat' u (int($0/G)*f*w + (int($0)%G)*w):($5/1e-3) w boxes lc rgb 'dark-red', \
'' u (int($0/G)*f*w + (int($0)%G)*w):(0):4 w labels offset 0, char 1
的簇号为int($0/G)
使用特殊的列数0
(给在输入数据文件中的从零开始的行数)来计算。以类似的方式,int($0)%G
产生其集群内特定框的位置。