1

我正在使用 gnuplot v4.6 patchlevel 6 创建时间序列数据的堆叠图。当我尝试在命令后的语句中使用该sprintf()函数时,gnuplot 报告:plottitle

"stacked.plot", line 81: undefined function: columnheader

我在这篇文章https://newspaint.wordpress.com/2013/09/11/creating-a-filled-stack-graph-in-gnuplot/之后模拟了我的情节。

数据如下:

epoch read_count write_count
1450760479 4933.0 3598.0
1450760779 8049.0 2161.0
1450761079 6099.0 2458.0
1450761379 3670.0 2349.0
1450761679 4130.0 2336.0
1450761979 2415.0 3222.0

我的情节命令看起来像:

j=3
plot \
  for [i=2:j:1] \
    TARGET using 1:(sum [col=i:j] column(col)) \
      title sprintf("%s - %s",HOST,columnheader(i)) \
      with filledcurves x1

如果我除了删除sprintf()函数之外什么都不做,gnuplot 会愉快地完成任务而不会出错。

j=3
plot \
  for [i=2:j:1] \
    TARGET using 1:(sum [col=i:j] column(col)) \
      title columnheader(i) \
      with filledcurves x1

谁能帮我理解我在这里做错了什么?

4

0 回答 0