[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ESPResSo] gnuplot
From: |
Axel Arnold |
Subject: |
Re: [ESPResSo] gnuplot |
Date: |
Tue, 4 May 2010 11:27:34 +0200 |
User-agent: |
KMail/1.10.3 (Linux/2.6.27.45-0.1-default; KDE/4.1.3; x86_64; ; ) |
Hi,
Tcl quoting is a bit tricky... Your example should be
"set xrange \[0.9:0.91\]"
or
{set xrange [0.9:0.91]}
Basically, inside quotation marks, commands and variables are still expanded,
while in curled braces, nothing happens. Therefore, while
"set xrange \[$start:$end\]"
would work,
{set xrange [$start:$end]}
would not, since gnuplot would get "$start" and "$end" as boundaries.
So, there are three types of quotations/brackets in Tcl:
1. {}: embraces a raw string, contents are kept character by character
2. "": embraces a string, in which [] (command substitution) and $ (variable
substitution) are evaluated
3. []: command substitution: as "", but the content is evaluated as Tcl
expression, and [...] replaced by the result of this command
As usual, a \ can be used to prevent the evaluation of [] or $, but unlike in
many other languages, single quotes have no special meaning in Tcl. Something
like
set test 'a b'
causes an error, because you try to assign two separate values, <'a> and <b'>,
to test.
Axel
On Tuesday 04 May 2010 11:10:52 Guillaume Larsen wrote:
> Hi Olaf,
>
> nope, the problem still persists.
>
> Guillaume
>
> > Date: Tue, 4 May 2010 11:04:43 +0200
> > From: address@hidden
> > To: address@hidden
> > Subject: Re: [ESPResSo] gnuplot
> >
> > Quoting Guillaume Larsen <address@hidden>:
> > > I have a slight problem concerning the plotObs function of ESPResSo.
> > > When I try to pass gnuplot arguments to specify a restricted range,
> > > for instance 'set xrange [0.9:0.91]', ESPResSo tries to evaluate
> > > what is between the brackets [] and thus returns an error, saying
> > > that '0.9:0.91' is not a valid command name.
> > > How to avoid this problem?
> >
> > Try "set xrange '[0.9:0.91]'"
> >
> > Olaf
> >
> > ----------------------------------------------------------------
> > This message was sent using IMP, the Internet Messaging Program.
> >
> >
> >
> > _______________________________________________
> > ESPResSo mailing list
> > address@hidden
> > https://fias.uni-frankfurt.de/mailman/listinfo/espresso
>
> _________________________________________________________________
> Hotmail et MSN dans la poche? HOTMAIL et MSN sont dispo gratuitement sur
> votre téléphone! http://www.messengersurvotremobile.com/?d=Hotmail
--
Dr. Axel Arnold Tel: +49 711 685 67609
ICP, Universität Stuttgart Email: address@hidden
Pfaffenwaldring 27
70569 Stuttgart, Germany