[Top][All Lists]

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

gplot command with linestyle

From: John W. Eaton
Subject: gplot command with linestyle
Date: Thu, 27 May 1999 22:10:18 -0500 (CDT)

On 26-May-1999, Dipl.-Ing. Stefan Zimmermann <address@hidden> wrote:

| I want to make plots with different linewidths, but using:
| octave:1> gset linestyle 1 linetype 1 linewidth 2
| for a plot like
| octave:2> gplot data with lines linestyle 1
| results in
| error: `linestyle' undefined near line 2 column 23
| error: evaluating expression near line 2, column 23
| error: evaluating plot style command
| I tried:
| octave:3> gplot data with lines linetype 1 linewidth 2
| but this yields:
| parse error:
| >>> gplot data with lines linetype 1 linewidth 2
|                                               ^  
| What is the problem and how can I avoid it?

The problem is that in order for Octave to do the appropriate variable
substitutions in the gplot command, it must parse the entire gplot
command before passing it to gnuplot.  Unfortunately, that means that
any time the gnuplot syntax changes, Octave's parser also has to
change to support the new syntax.  So far, no one has extended
Octave's parser to handle all the stuff that is new in gnuplot 3.7 and
I have no plans to extend this interface any further myself.  However,
if someone else provides a clean patch for the 2.1.x sources I would
consider installing it.

The reason that the gset command works is that Octave simply passes
the text of the gset command (up to the next command separator)
directly to the gnuplot subprocess without doing any additional
processing.  That's also why things like

  octave:1> my_linestyle = 1
  octave:2> gplot data with lines linestyle my_linestyle

won't work.

| (Perhaps it´s a bug?)

Sorry, if there is a bug, it is in the design.  I should have never
caved in to the pressure to try to mimic the gnuplot command-line
interface directly in Octave.



reply via email to

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