线程Why autotitle wrong in this Gnuplot?的代码在旧的Gnuplot(19.4.2015)中有效,但在最新的Ubuntu 15.10和OS X 10.11.2中失败了。 数据
Model Decreasing-err Constant-err Increasing-err
2025 73-78 80-85 87-92
2035 63-68 80-85 97-107
2050 42-57 75-90 104.5-119.5
代码最初基于Christoph的回答here
set terminal qt size 560,270;
set grid; set offset 1,1,0,0;
set datafile separator " -";
set key autotitle columnhead;
plot for [i=2:6:2] "model1_range.dat" using 1:(0.5*(column(i)+column(i+1))):(0.5*(column(i+1)-column(i))) with yerrorlines;
Ubuntu 15.10 Gnuplot 4.6 patchlevel 6 中的输出,其中两个密钥错过两次警告warning: Cannot find or open the file "model1_range_linear.dat"
所以两个错过错误栏
输出是OS X 10.11.2中带有 Gnuplot 5.0 patchlevel 1 的三个警告和No data in plot
没有任何错误条。
我无法理解两个系统和Gnuplot版本4/2015之间的异构行为。
为什么键失败了最新的Gnuplot?
答案 0 :(得分:2)
这是我输入的内容:
08:26 ~ > cat test.txt
Model Decreasing-err Constant-err Increasing-err
2025 73-78 80-85 87-92
2035 63-68 80-85 97-107
2050 42-57 75-90 104.5-119.5
然后通过brew install gnuplot --with-pdflib-lite --with-x11 --with-cairo
08:26 ~ > gnuplot
G N U P L O T
Version 5.0 patchlevel 1 last modified 2015-06-07
Copyright (C) 1986-1993, 1998, 2004, 2007-2015
Thomas Williams, Colin Kelley and many others
gnuplot home: http://www.gnuplot.info
faq, bugs, etc: type "help FAQ"
immediate help: type "help" (plot window: hit 'h')
Terminal type set to 'x11'
gnuplot> show version long
G N U P L O T
Version 5.0 patchlevel 1 last modified 2015-06-07
Copyright (C) 1986-1993, 1998, 2004, 2007-2015
Thomas Williams, Colin Kelley and many others
gnuplot home: http://www.gnuplot.info
faq, bugs, etc: type "help FAQ"
immediate help: type "help" (plot window: hit 'h')
Compile options:
-READLINE +LIBREADLINE +HISTORY
-BACKWARDS_COMPATIBILITY +BINARY_DATA
+GD_PNG +GD_JPEG +GD_TTF +GD_GIF +ANIMATION
-USE_CWDRC +X11 +X11_POLYGON +MULTIBYTE +X11_EXTERNAL +USE_MOUSE +HIDDEN3D_QUADTREE
+DATASTRINGS +HISTOGRAMS +OBJECTS +STRINGVARS +MACROS +THIN_SPLINES +IMAGE +USER_LINETYPES +STATS +EXTERNAL_FUNCTIONS
MAX_PARALLEL_AXES=7
GNUPLOT_DRIVER_DIR = "/usr/local/Cellar/gnuplot/5.0.1/libexec/gnuplot/5.0"
GNUPLOT_PS_DIR = "/usr/local/Cellar/gnuplot/5.0.1/share/gnuplot/5.0/PostScript"
HELPFILE = "/usr/local/Cellar/gnuplot/5.0.1/share/gnuplot/5.0/gnuplot.gih"
gnuplot> set grid; set offset 1,1,0,0;
gnuplot> set datafile separator " -";
gnuplot> set key autotitle columnhead;
gnuplot> plot for [i=2:6:2] "test.txt" using 1:(0.5*(column(i)+column(i+1))):(0.5*(column(i+1)-column(i))) with yerrorlines;
gnuplot>
希望它有所帮助!