From: <pe...@pi...> - 2007-05-03 21:38:58
|
On Thu, 03 May 2007 22:43:12 +0200, Hans-Bernhard Bröker <HBB...@t-...> wrote: > pl...@pi... wrote: > >> here's a line from my working .gnu that does plot the line I want to >> output to a table: >> >> >> plot "150tank-txC.data" using 1:($1<"14:00")?(P( Th4($3-2.0) - >> Th5($2) )/10):(P1( Th4($3-2.0) - Th5($2) )/10) with lines t "useful >> power" > > That's almost certainly not going to work as planned. Time/date data > and $1 notation for extended using columns don't mix. If it ever > appears to work, that's a fluke. OK let's forget the conditional syntax, that's irrelevant here because I've already stripped this down to the most simple form and posted that as the error. > >> however , if I use this in a table context I get an error: > >> gnuplot> load "150tank-txC.gnu" >> "150tank-txC.gnu", line 46: Bad format character > > I'm reasonably sure you get the same basic error in every other context > -- you just don't see it. > Do you mean that gnuplot is picking this up here and choking on it but deals with it incorrectly elsewhere without producing an error ? > For more precise help, you'll have to actually _show_ us that command > script (or a sufficient subset reproducing the problem). > I thought I had done just that, I'll try again. Here's the start of the data. All other lines are empty or start with # 12:00 6.89 8.63 6.31 6.77 7.84 12:17 6.84 8.45 5.96 6.67 5.50 12:24 6.88 8.26 5.78 6.64 5.43 12:38 6.60 7.65 5.16 6.38 4.61 Here's the essencials of the script, calibration-results.gnu was created by save command with the plot command commented out later so it contains a full set of instructions. I believe the time data settings needed are explicitly set below so should override anything done be that file. # load thermistor calibration data and functions: eg Th5() etc. load "calibration-results.gnu" set xdata time set timefmt "%H:%M" set format x "%02H:%02M" set xr ["11:30":"18:30"] datafile="150tank-txC.data"; set title "150 litre tank forced flow test 12 - PC cover" set yrange [-5:85] set y2range [-50:850] set y2tics 0,100,800 set xlabel "time CES: sol +2h" set ylabel "temp / C" set y2label "power / W" set key box set key top right set table "tmp.data" # plot datafile using 1:(Th5($2)); # plot datafile using 1:($2); # plot datafile using (timecolumn(1)):($2); # plot datafile using (column(1)):($2); unset table plot datafile using 1:(Th5($2)) with lines t "tank outlet" Now if I uncomment each of those table lines in turn here's the errors I get. gnuplot> load "150tank-txC.gnu" "150tank-txC.gnu", line 47: Bad format character gnuplot> load "150tank-txC.gnu" "150tank-txC.gnu", line 48: Bad format character gnuplot> load "150tank-txC.gnu" "150tank-txC.gnu", line 49: Bad format character gnuplot> load "150tank-txC.gnu" "150tank-txC.gnu", line 50: Bad format character I seems pretty clear that in table mode it is unable to parse the the time data whatever way I go about it. If all are commented out the graph gets plotted beautifully on wxt , png, or svg by the later plot command. I hope that gives you a clearer picture of what is happening. Thanks for your help. |