[Top][All Lists]

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

gshow key

From: John W. Eaton
Subject: gshow key
Date: Mon, 3 Jan 2000 13:15:18 -0600 (CST)

On 31-Dec-1999, Ben Sapp <address@hidden> wrote:

| Is there any way to record in an Octave variable the current state of
| gnuplot's key variable?   I would like to do the following in a script:
| -------------------------------------------
| record key state;
| make key state what I need for next plot;
| restore old key state;  
| -------------------------------------------
| My first attempt looked like this:
| --------------------------------------------
| octave:13> key_state = eval("gshow key")
| error: value on right hand side of assignment is undefined
| error: evaluating assignment expression near line 13, column 11
|         key is ON, position: top right corner
|         key is right justified, not reversed and not boxed
|         sample length is 4 characters
|         vertical spacing is 1 characters
|         width adjustment is 0 characters
|         key title is ""
| octave:13> key_state
| error: `key_state' undefined near line 13 column 1

The problem is that Octave communicates with gnuplot using a one-way
pipe.  The information printed by gnuplot's show command is sent to
stdout (or stderr?) but Octave does not read it.

FWIW, I don't think the solution is to connect gnuplot and Octave
using a two-way pipe, because then we would have to rely on being able
to parse the output to get the information we want.  That seems too
unreliable to me (the information displayed is likely to change as
gnuplot changes).


Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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