【发布时间】:2019-01-18 10:33:28
【问题描述】:
大家:
在以直方图的形式表示数据时,我遇到了问题。 我不太清楚如何清楚地表达我的意图,但我的想法是:
- 3 组列(碳化物、硼化物和氮化物)
- 在每组色谱柱中,4 根色谱柱(铪、锆、钛和 钽)每个都有一个网格类型。
到目前为止,我已经完成了下面显示的操作,但它不允许我继续
我当前的代码是:
reset
fontSpec(s) = sprintf("Times-Roman, %d", s)
set term post eps enhanced fontSpec(16)
set output 'TVsG.eps'
set grid
set auto y
set auto x
ticsFont=fontSpec(16)
set xtics font ticsFont
set ytics font ticsFont
set ylabel "Temperature" font fontSpec(25) offset char -1,0
set xlabel "Group" font fontSpec(25) offset 0,char -1
set style fill pattern border -1
set style data histograms
set boxwidth 1.0
set style histogram clustered gap 1
keyFont=fontSpec(18)
set key spacing 2 font keyFont
set key at graph 0.25, 0.9
fn(v) = sprintf("%.1f", v)
plot \
for [COL=2:4] 'data.txt' using COL:xticlabels(1) title columnheader fs
pattern 2, \
'data.txt' u ($0-1-1./6):2:(fn($2)) w labels font fontSpec(14) offset
char 0,0.5 t '' , \
'data.txt' u ($0-1-1./6):2:(fn($3)) w labels font fontSpec(14) offset
char 0,0.5 t '' , \
'data.txt' u ($0-1+1./6):3:(fn($4)) w labels font fontSpec(14) offset
char 0,0.5 t ''
还有我的数据文件
Material Hafnium Zirconium Titanium Tantalum
Carbide 3958 3400 3100 3768
Boride 3380 3245 3225 3040
Nitride 3385 2950 2950 2700
我现在遇到的主要问题是以下错误:
gnuplot> load 'gnuplot2.txt'
"gnuplot2.txt" line 34: warning: Cannot find or open file "data"
"gnuplot2.txt" line 34: warning: Cannot find or open file "data"
"gnuplot2.txt" line 34: warning: Cannot find or open file "data"
"gnuplot2.txt" line 34: warning: Cannot find or open file "data"
"gnuplot2.txt" line 34: warning: Cannot find or open file "data"
"gnuplot2.txt" line 34: warning: Cannot find or open file "data"
"gnuplot2.txt" line 34: No data in plot
现在我到了一个点,我不知道如何继续
【问题讨论】: