我的数据文件包含此内容
# data file for use with gnuplot
# Report 001
# Data as of Tuesday 03-Sep-2013
total 1976
case1 522 278 146 65 26 7
case2 120 105 15 0 0 0
case3 660 288 202 106 63 1
Run Code Online (Sandbox Code Playgroud)
我正在使用下面的脚本从案例...行制作直方图 - 这是有效的.我的问题是:如何从数据文件加载1976年的总值(在'total'一词旁边)并且(a)将其存储到变量中或(b)直接在图表的标题中使用它?
这是我的gnuplot脚本:
reset
set term png truecolor
set terminal pngcairo size 1024,768 enhanced font 'Segoe UI,10'
set output "output.png"
set style fill solid 1.00
set style histogram rowstacked
set style data histograms
set xlabel "Case"
set ylabel "Frequency" …Run Code Online (Sandbox Code Playgroud)