[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variables in gnuplot commands

From: Dutt, Vinayak, Ph.D.
Subject: Re: Variables in gnuplot commands
Date: Tue, 19 Nov 1996 19:03:12 -0600

John Eaton wrote (in reply to Ron Kumon's query):
#: Does anyone know why you cannot use variables in gnuplot "set" commands 
#: from within Octave?
#: octave> xsize=0.5
#: octave> ysize=0.5
#: octave> set size xsize,ysize
#: octave>          line 0: undefined variable: xsize
#This happens because Octave only parses the set command by noting that
#it is a set command and then passing all the remaining text (up until
#the next newline or semicolon) directly to gnuplot.  It never notices
#that there might be variables that should be expanded.

Well, there are benefits to Octave not parsing set command. When gnuplot
updates add more set options, I don't have to wait for Octave updating its
parser for the new options. Thus gnuplot 3.6 (beta) can now be used without
having to wait for next release of Octave. The fact that gplot and gsplot
do parse the command kind of causes problems with using newer line styles
of gnuplot 3.6 (for example boxerrorbars can not be used with gplot and
gsplot), but again as set command is not parsed, I can overcome this
restriction with using set command instead ("set data style boxerrorbars").

Anyway, I just wanted to point out that set no being parsed is also beneficial
in some way :-)

Vinayak Dutt

Ultrasound Research
Mayo Clinic
Rochester MN 55905
E-Mail: address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]