help-octave
[Top][All Lists]
Advanced

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

Re: how to make ginput work?


From: Petr Mikulik
Subject: Re: how to make ginput work?
Date: Mon, 24 Mar 2008 21:40:43 +0100 (CET)

> In fact I'm not sure it works at all with Octave 3.0.0 at the moment
> given all of the changes to the graphics code...

The file "ginput_gp41_2.zip" available at
        http://gnuplot.sourceforge.net/links.html
contains ginput.m and waitforbuttonpress.m commands for Octave 2.1.

ginput.m needs graw() to work in order to send to gnuplot these commands:
        set print "tmp file from mkfifo()"
        pause mouse any
        print MOUSE_X, MOUSE_Y, MOUSE_KEY
        unset print
The printed line is read back into Octave and thus x,y,key are available 
for output of ginput().

Without graw(), is it somehow possible to write to the running gnuplot of 
the active figure()? Is there a handle or file descriptor? I would expect 
something like:

g=get(gca());
if isfield(g,'gnuplot_fd')
    gp=g.gnuplot_fd;
    fprintf(gp, '... pause mouse any ...');
end

Is it possible to update the ginput.m for 2.1 for 3.0?

Michael Goffioul wrote:
>> If you're using the Windows binary package, then ginput is not
>> working. There's currently no way to make it work.

As the script needs mkfifo(), I wonder whether this function is available
on Windows (in Octave).

---
Petr Mikulik


reply via email to

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