|
From: Janos L. <jan...@ya...> - 2010-06-17 18:40:17
|
Hi,
I am on a Mac with OS 10.6.3 and using gnuplot 4.4 patchlevel 0.
This is the content of my context.gp file:
set xdata time
set timefmt "%b %d, %Y %H:%M:S"
set format x "%m\n%y"
set title "Context Switches"
set logscale y
set xlabel "DateTime [month/year]"
set ylabel "Context Switches [#/hour]"
set terminal postscript eps color
set output '/Volumes/Data/PROJECTS/Sysmon/graphs/context.ps'
plot [][] "/Volumes/Data/PROJECTS/Sysmon/outs/context.out"
using 1:5 title "Voluntary Yields" smooth bezier with lines,
"" using 1:($6 > 0 ? $6 : 1) title "Cache Misses" smooth bezier with lines,
"" using 1:($7+1) title "System Disk Writes" smooth bezier with lines,
"" using 1:($8+1) title "I/O Paceing" smooth bezier with lines,
"" using 1:($9+1) title "Logical Lock Contention" smooth bezier with lines
set terminal x11
set output
set xdata
set timefmt
set format x
unset logscale y
set xlabel
set ylabel
I load this with :
gnuplot> call '/Volumes/Data/PROJECTS/Sysmon/gnuplot_cmds/context.gp'
gnuplot complains this way:
gnuplot> plot [][] "/Volumes/Data/PROJECTS/Sysmon/outs/context.out"
using 1:5 title "Voluntary Yields" smooth bezier with lines,
"" using 1:( > 0 ? : 1) title "Cache Search Misses" smooth bezier with lines,
"" using 1:(+1) title "System Disk Writes" smooth bezier with lines,
"" using 1:(+1) title "I/O Paceing" smooth bezier with lines,
"" using 1:(+1) title "Logical Lock Contention" smooth bezier with
lines
^
"/Volumes/Data/PROJECTS/Sysmon/gnuplot_cmds/context.gp",
line 11: invalid expression
As you can see it lost the $field variables.
If I do it interactively and do not set the terminal to postscript and the
output to the file, the gnuplot does not complain and I see the graphic.
What am I doing wrong ?
Thanks ahead,
János
|