我會說這也取決於你想處理的一般輸入。在該列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
產生其集羣內特定框的位置。