help-octave
[Top][All Lists]
Advanced

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

Re: Problem with ginput


From: Ben Abbott
Subject: Re: Problem with ginput
Date: Thu, 10 Dec 2009 07:26:49 -0500

On Dec 10, 2009, at 2:19 AM, Matthias Brennwald wrote:

> On Dec 9, 2009, at 1:53 PM, Ben Abbott wrote:
> 
>>> Dear all
>>> 
>>> I have a problem using the ginput command with Octave 3.2.3 on Windows  
>>> XP (I did the same on a Mac running Mac OS X, where everything worked  
>>> as expeced). Using ginput results in warnings and never returns any  
>>> result. Here's an example:
>>> 
>>> --------------
>>> octave.exe:5:~\Desktop
>>>> gnuplot_binary
>>> ans = C:\Octave\3.2.3_gcc-4.4.0\bin\gnuplot.exe
>>> octave.exe:6:~\Desktop
>>>> version
>>> ans = 3.2.3
>>> octave.exe:7:~\Desktop
>>>> which ginput
>>> `ginput' is a function from the file C:\Octave\3.2.3_gcc-4.4.0\share 
>>> \octave\packages\plot-1.0.7\ginput.m
>>> octave.exe:8:~\Desktop
>>>> plot (rand(1,10))
>>> octave.exe:9:~\Desktop
>>>> ginput (1)
>>> warning: implicit conversion from real matrix to real scalar
>>> warning: implicit conversion from real matrix to real scalar
>>> warning: implicit conversion from real matrix to real scalar
>>> warning: implicit conversion from real matrix to real scalar
>>> [THINGS SEEM TO BE STUCK HERE. THE ONLY WAY TO EXIT FROM GINPUT AT  
>>> THIS POINT SEEMS TO BE CTRL-C.]
>>> --------------
>>> 
>>> I don't know what to do to fix this. Is this a but or am I doing  
>>> something in the wrong way? I'd appreciate any help.
>>> 
>>> Matthias
>> 
>> Matthias, can you tell us what version of gnuplot you're using? You can get 
>> that info by type "__gnuplot_version__" at Octave's prompt.
>> 
>> I don't have a windows machine to test this on, but this problem may have 
>> been fixed.
>> 
>> The prior discussion is at this link.
>> 
>>      http://old.nabble.com/Ginput-doesn't-work-in-3.2.3-to26470943.html
>> 
>> The changeset is linked to below.
>> 
>>      http://hg.savannah.gnu.org/hgweb/octave/rev/fea3d4868692
>> 
>> Can someone confirm this change fixed the problem?
>> 
>> Ben
> 
> Dear Ben, dear all
> 
> I believe the above change to __go_draw_figure__.m does not fix my issue. I 
> applied the change by hand (I don't know how to use the programs that were 
> made for this...), but I still get the very same behavior from ginput(). 
> Maybe I did not apply the change properly. So:
> 
> - Can someone send me a properly patched version of the file?
> 
> - Can someone confirm if the ginput() issue does (not) occur on his/her setup 
> (Windows XP, Octave 3.2.3 and gnuplot 4.3, downloaded from 
> http://octave.sourceforge.net ).
> 
> Thanks
> Matthias

I have modified a version of __gnuplot_ginput__.m which inserts to "unset 
multiplot" command into the gnuplot stream prior to asking for coordinates. 
Please try using it on both your Mac and PC.

Be sure to cd to the directories containing the modified version and try ...

        [x, y, m] = __gnuplot_ginput__ (gcf, 1)

If it doesn't work, try to restore the path to its original default (in case 
there is a conflict between an octave core function and a local one)

        restoredefaultpath
        [x, y, m] = __gnuplot_ginput__ (gcf, 1)

If it still doesn't work, try "debug_on_warning" to determine what line is 
producing the warning.

        debug_on_warning
        [x, y, m] = __gnuplot_ginput__ (gcf, 1)

Ben

Attachment: __gnuplot_ginput__.m
Description: Binary data





reply via email to

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